Get YouTube videos from a series of channel's feeds
| config | ||
| get_youtube_videos | ||
| .gitignore | ||
| classify_videos.sh | ||
| clean_orphan_json_files.py | ||
| Dockerfile | ||
| fix_dir_dates.sh | ||
| get_youtube_videos.sh | ||
| install.sh | ||
| LICENSE | ||
| podman_build.sh | ||
| podman_push.sh | ||
| podman_run.sh | ||
| pyproject.toml | ||
| README.md | ||
| requirements.txt | ||
| setup.cfg | ||
| setup.py | ||
| wrapper.sh | ||
get_youtube_videos
Command line tool to fetch YouTube videos of a series of channels using yt-dlp and proxies. When a proxy fails it will try the next one.
Requirements
Installation
Linux
To install for example in your ~/.local/bin folder:
./install.sh --destination ~/.local/bin
To install system-wide:
sudo ./install.sh --destination /usr/local/bin
Change your configuration file in "${HOME}/.config/get_youtube_videos.conf" (see the example in the config folder).
Windows (from PowerShell)
Ensure you have "C:\Users${env:USERNAME}\AppData\Roaming\Python\Python${python_version}\Scripts" in your Path environment variable.
& $(where.exe pip).split()[0] install .
Usage
Usage: get_youtube_videos.sh [OPTIONS]
Options:
-d, --debug-level [critical|error|warning|info|debug|notset]
Set the debug level for the standard output.
-l, --log-file TEXT File to store all debug messages.
-p, --proxy TEXT URLs for proxies to use in case of errors.
-D, --downloaded-database TEXT File to store the IDs of downloaded videos
-f, --download-dir TEXT Folder to store the downloaded videos
-C, --channels TEXT YouTube channels IDs to look up. Separate
channel ID and channel folder with a colon
(:). It can be specify multiple times [required]
-r, --channel-limit INTEGER Maximun number of videos to download from a
channel
-L, --total-limit INTEGER Maximun number of videos to download in
total
-M, --max-length INTEGER Maximun duration of videos to download in
seconds
-s, --subtitle-langs TEXT List of languages of the subtitles to
download (can be regex). The list may
contain "all" to refer to all the available
subtitles. The language can be prefixed with
a "-" to exclude it from the requested
languages, e.g. ['all', '-live_chat']. And
you can use wildcards like en.*
-c, --channels-folder Create folders per channel and save videos
inside their own channel folder
-S, --skip-live-videos Skip live videos
-F, --cache-file TEXT Cache file to store data from each run
-a, --max-cache-age INTEGER Max age in seconds for the cache
-A, --max-proxy-failures INTEGER
Number of retries of each proxy per run
-X, --max-proxy-failures-per-video INTEGER
Number of retries of each proxy per video
-G, --min-age-proxy-error INTEGER
Minimun age for proxy errors in seconds.
-O, --shorts Get short videos. By default it doesn't get them.
-o, --output-format [json|yaml|csv|plain]
Set the output format.
-H, --max-video-height INTEGER Max video height
--config FILE Read configuration from FILE.
--help Show this message and exit.