Skip to main content

A CLI for exporting YouTube playlists' data to local files

Project description

YouTube Playlist Exporter

Tired of videos disappearing from your YouTube playlists, without leaving you the option to know what was there before?

Fear not! For this CLI will have you covered

alt text

This CLI allows exporting data about videos in your playlist to a local file, that can be used as a backup in case videos from the playlist become private/get deleted.

Installation

This CLI is published to PyPI and can be installed with pip using:

pip install youtube-playlist-exporter==0.1.0

Usage

  1. Get a YouTube API Key. To do so, you can follow the instructions here: https://elfsight.com/help/how-to-get-youtube-api-key/
  2. Retrieve the YouTube id of the playlist you want to create a backup for. This can be done in several ways. One of them is by navigating to the playlist's main YouTube page, and copying the text after "...list=" in the url
  3. If you didn't do so already, install the CLI (see installation)
  4. Run the CLI using either the ype or youtube-playlist-export commands (full details on the CLI syntax are provided by running with the --help flag)
  5. Several text files will be generated by the script in the output directory:
    1. <PLAYLIST_NAME>-YoutubeBackupNew.txt: contains the current updated lists of the titles of the provided YouTube playlist
    2. <PLAYLIST_NAME>-YoutubeBackup.txt: if a ...YoutubeBackupNew.txt file existed in the output directory before running the script, this file will be a backup for it (in case something went wrong with running the script etc.)
    3. <PLAYLIST_NAME>-YoutubeBackupDiff.txt: if a ...YoutubeBackupNew.txt file existed in the output directory before running the script, this file will contain the numbers of the videos whose title changed. This diff can handle new videos being added. However, if some videos from the old list were deleted, it won't take it into account properly
    4. <PLAYLIST_NAME>-YoutubeBackupDiffOld.txt: if a ...YoutubeBackupDiff.txt file existed in the output directory before running the script, this file will contain a backup for it

TODOs

  1. Allow exporting a CSV with additional details (video ID, channel that uploaded etc.) instead of just the video titles
  2. Compare files based on video IDs?
  3. Add additional backup mechanisms? GIT backup?

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

youtube_playlist_exporter-0.1.0.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

youtube_playlist_exporter-0.1.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file youtube_playlist_exporter-0.1.0.tar.gz.

File metadata

File hashes

Hashes for youtube_playlist_exporter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bac788796af7c3e638c0fb0221b9338f51256b2596363b46e62fffd2ad93285b
MD5 72a58121fd11ca3a678c2e3b20e4aa5c
BLAKE2b-256 3b2b23b88b66d3d7fa103a3caee75fa28bd2396a344a39b944681756180c350b

See more details on using hashes here.

File details

Details for the file youtube_playlist_exporter-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for youtube_playlist_exporter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5649e7313aa19eb64a668461bdff15a626cd86d0e6feffc7c5b1a6deb311117a
MD5 c6ef6185fea615785d3fb38eecc63c4f
BLAKE2b-256 d29585d47bff9b71495515804ed01fdeacf55871bffa65bed54134a9fbe5612d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page