Keeping track of which YouTube videos you have watched can be tricky, especially because the "WATCHED" indicator seems to be ephemeral. This script allows you to add all videos from a YouTube channel to a playlist that you control so you can order them as you please and remove them once they've been watched.
-
Install this application with pip:
pip install git+https://github.com/RobbieClarken/youtube-channel-to-playlist
-
Create a project through the Google Cloud Console.
-
Enable your project to use the YouTube Data API via the APIs & Services Dashboard.
-
Create an OAuth Client ID for a native application through the Credentials page under APIs & Services.
-
Download the OAuth client secrets JSON file from the Credentials page and rename it to
client_secrets.json
.
channel_to_playlist --secrets client_secrets.json source-channel-id target-playlist-id
where source-channel-id
and target-playlist-id
can be found from the URLs of
the YouTube channel and playlist.
For example, to copy videos from the PyCon 2015 Channel to this playlist you would run:
channel_to_playlist --secrets client_secrets.json UCgxzjK6GuOHVKR_08TT4hJQ PLlgnub_DBR_CszAWpJypwst0OFDxW6jOJ
The script will store the video IDs that are added to the playlist in a file and skip these videos if it is run again. This allows you to re-run the script when new videos are uploaded to the channel.