Hello,
I am waiting for a proposal regarding the deadlines and costs!
The full description is in the attached file. It does not fit here due to character limits.
- A script in Python is needed that will download channels completely and organize videos into folders if there are Playlists on the channel.
- The script should periodically check the channels and track the appearance of new videos; when a new video appears, the script should download the new video. (the script does not track or download Shorts and Live broadcasts)
- The script in the file done.xml should save statistics about its work (what, when was downloaded)
Now let's go into detail about the functionality:
- In the root folder of the script in the file channels.xml, we add the channels we want to track and download. The structure of the file:
Chanel_name; bitrate; subtitles;directory
sabachka+Ukrainian_fairy_tales;1080;yes/no;/home/video/
Chanel_name; - the name of the channels we are tracking
bitrate; - the bitrate at which we download. If it is set to 10180 and the video is shot in 720p, we download in the highest available, which is 720p. (each channel may have its own bitrate for downloading)
subtitles; whether to download subtitles or not. If we download subtitles, the subtitle file is named the same as the video file and is placed in the same folder as the video. (we only download English / Russian / Ukrainian subtitles) at the end of the file name we add the locale, for example subtitle1_ru
directory – the root path where we create a folder for the channel. In the root folder, we create a folder named after the channel, for example sabachka+Ukrainian_fairy_tales, and we place all videos for the channel there. Each channel may have its own root folder, meaning one channel may be in the folder /home/video/ while another channel may be in the folder /medio/video/
2) Working with Playlists. If the channel has a playlist "Cartoons for Kids" and a second playlist "Cartoons for Adults," then in the root folder of the channel sabachka+Ukrainian_fairy_tales, a folder "Cartoons for Kids" and a folder "Cartoons for Adults" are created, and videos are placed in the folder according to the Playlist they belong to. Videos that do not belong to any playlist are placed in the root folder of the channel.
3) The video file is created with the same name as the title of the video on the channel (don't forget to replace special characters in the video title with a dash - to avoid file system conflicts and ensure files open correctly)
A json file is created in the folder where the video is located, with the same name as the video
In the json file, we save information about the video:
Date of download: the date and time when the video was downloaded by the script
Date of publish: the date when the video was published on YouTube
Video_name: The title of the video
Playlist: The title of the playlist if the video belongs to a specific playlist.
Link: the full path to the video in the browser for the specific video
Description: the text field under the video on YouTube with the video description
- In the root folder of the script, there should be two files: queue.xml and done.xml
After starting the script, it goes through all the channel folders, creates a temporary technical json file with a list of all videos that have already been downloaded based on all json files described in point 3. Then it accesses each channel on the internet and checks for new videos. All new videos are placed in the file queue.xml in the following format:
Chanel_name;video_name;playlist;Chanel_web_link
Channel name: sabachka+Ukrainian_fairy_tales
Video name: Well, Just You Wait episode No. 3
Playlist; The title of the playlist if the video is in a playlist
Link to the video: https://www.youtube.com/watch?v=SbJAv0jfL4Q&list=RDSbJAv0jfL4Q&start_radio