Skip to content

Parses YouTube XML feeds and calls external commands on the video files

License

Notifications You must be signed in to change notification settings

a-lam/youtube-feed-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Youtube-Feed-Parser

This tool takes in a list of Youtube channels or playlists and executes a command against the videos found. This tool can be used in conjunction with downloaders such as youtube-dl or other forks of the project.

Requirements

Usage

  1. Download the application.
    curl -L https://github.com/a-lam/youtube-feed-parser/archive/refs/heads/main.zip --output main.zip
    unzip main.zip
    
  2. Prepare the sources file.
  3. Execute the tool.
    python parse.py --command CMD --sources SOURCE_FILE --history HISTORY_FOLDER
    

Arguments

--command COMMAND           Command to execute against each file. (Required)
--sources FILE              File that contains the URLs of channels/playlists. (Required)
--history FOLDER            Folder to store the history of processed videos. (Required)
--days NUMBER               How old a video's published date can be to be processed. (Default=3)

Preparing Sources

The sources file is a list of URLs for the tool to fetch videos from. The sample-sources.json file contains an example of what this file may look like. It contains a json object with a single key/value pair of "sources" which is a list. Each item in the list is another json object with two keys "channel" and "url". "channel" is only used for readability, the tool does not use this value. "url" is a direct link to the channel or playlist's XML feed.

The sample-sources.json file has an example of both a channel feed and a playlist feed, denoted by the "channel_id" and "playlist_id" parameters of the URL, respectively. A channel or playlist's id may be obtained by navigating directly to the channel or playlist through a browser. For channels, if found via search might lead to a URL with the channel's friendly name, such as "https://www.youtube.com/c/mkbhd". In this case, you will need to parse through the source of the page to grab its' external ID via this method.

About

Parses YouTube XML feeds and calls external commands on the video files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages