Skip to main content

Overview

This tool knows how to poll for changes to playlist(s) and to then download the physical videos for the new items automatically (using youtube-dl).

Features

  • More than one playlist can be provided.

  • The state is recorded for each playlist during each call. This is how the differences are calculated.

  • Uses python-googleautoauth for authentication.

  • Will gracefully accommodate multiple instances being run concurrently.

Installation

$ pip install youtube-autodownloader

Usage

The first time you run, you will have to build new credentials. The automatic-authentication flow will automatically run and open a browser window. To specifically run just the authorization, run:

$ ytad_autoauth

This works best in a desktop environment. Manual-authorization helper scripts are also provided to support console-only environment.

Since YouTube does not enforce uniqueness for playlist names, you are required to provide playlist IDs rather than names.

Example of finding a playlist ID using a playlist name:

$ ytad_search_playlists Animals
PLxaR7YEkaI0xxxxxxxxxxxxxxacWvmEih

$ ytad_search_playlists Special
PLxaR7YEkaI0xxxxxxxxxxxxxxr1gs86gE

Example of checking for and downloading new videos (“-p” is a playlist-ID, “-dp” is the download-path):

$ ytad_autodownload -p PLxaR7YEkaI0xxxxxxxxxxxxxxr1gs86gE -dp "/storage/videos/$(date '+\%Y')/Special"
Lion Vs Mongoose: Mongoose Fends Off Four Lions
- Playlist: Special
- ID: 1TPn1-SJqVM
- Download time: 9s
- Filename: 20140902 - Lion Vs Mongoose - Mongoose Fends Off Four Lions (1TPn1-SJqVM).mp4
- Size: 22.1M

Slow loris loves getting tickled http://bit.ly/14qLq8x
- Playlist: Special
- ID: PZ5ACLVjYwM
- Download time: 3s
- Filename: 20090426 - Slow loris loves getting tickled http -_bit.ly_14qLq8x (PZ5ACLVjYwM).webm
- Size: 3.1M

Testing

To run the tests:

$ ./test.sh

The tests will require user interaction with the browser.

Notes

  • If you do not wish to download the videos the first time that you run this command, omit the download-path parameter. This will just build the local database. Otherwise, all videos from the playlist will download. This might not be desireable for your use-case.

Metadata

Release files for youtube-autodownloader 0.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for youtube-autodownloader 0.2.6
File Size Uploaded Provenance Actions
youtube-autodownloader-0.2.6.tar.gz 13.2 kB Without provenance Details for youtube-autodownloader-0.2.6.tar.gz

Release files / youtube-autodownloader-0.2.6.tar.gz

Download URL youtube-autodownloader-0.2.6.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
950722b1c0761f9cf07f33dd18a9193b5df1b552ada4b5437f703ce7f58d5975
BLAKE2b-256 checksum
How to use checksums
ac63812b73aec3bf0ef7e607f02781496caba7a4e1f3a1822618ea7178f7f282
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for youtube-autodownloader 0.2.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page