Skip to content

Python script to download all YouTube videos from your Watch Later Playlist automatically.

License

Notifications You must be signed in to change notification settings

longpdo/youtube-dl-watch-later-playlist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YouTube-DL-Watch-Later-Playlist

Python script to download YouTube videos from your Watch Later Playlist

Open Issues License

Report Bug · Request Feature

Table of Contents

About The Project

Product Screenshot

youtube-dl-watch-later-playlist.py is a python script to automatically download all the first 100 YouTube videos from your current Watch Later Playlist. The script will start Chromedriver and login to your Google Account.

Logging in to your Google Account is currently done by signing up at stackoverflow.com via Google, since logging in to Google directly at YouTube won't work due to Google not trusting automated Webbrowsers like Chromedriver. The workaround works, since stackoverflow.com is one of the trusted apps by Google.

The script also works when your Google Account has Two-Factor Authentication activated and will wait for 5 minutes before throwing a TimeoutException.

After successfully logging in to Google and being redirected to stackoverflow.com, Chromedriver will move to https://www.youtube.com/playlist?list=WL and crawl the links for all the videos in the playlist and the script will start downloading them with youtube-dl.

Built With

Features

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

  • Python 3
# Install via brew on macOS
brew install python

For Linux and Windows refer to this.

  • Chromedriver
brew cask install chromedriver

For Linux and Windows refer to this.

  • youtube-dl
brew install youtube-dl

For Linux and Windows refer to this.

Installation

1: Fork the repository (using the Fork button at the top)

2: Clone the repository

# Replace {YOUR_USERNAME} with your actual username
git clone https://github.com/{YOUR_USERNAME}/youtube-dl-watch-later-playlist.git

3: Change directory to youtube-dl-watch-later-playlist

cd youtube-dl-watch-later-playlist

4: Install python requirements

pip3 install -r requirements.txt

Usage

  • Start the download script
python3 youtube-dl-watch-later-playlist.py
  • The script will prompt you for your google username and your google password

Usage Input Screenshot

  • After your input, the script will start an automated Chrome browser with Selenium and sign up to stackoverflow.com with your Google credentials.
  • If you entered wrong credentials you will be prompted for them again in your Terminal.

Usage Wrong Input Screenshot

Customize

  • You can change the download folder for the videos in line 11:
download_folder = '~/Downloads/'

Known Issues

  • Open Issue: Will only download the first 100 entries of your Watch Later Playlist

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgements

About

Python script to download all YouTube videos from your Watch Later Playlist automatically.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages