longpdo / youtube-dl-watch-later-playlist

Python script to download all YouTube videos from your Watch Later Playlist automatically.
MIT License
60 stars 38 forks source link
google-login python-script python3 selenium youtube-dl

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

# Install via brew on macOS
brew install python

For Linux and Windows refer to this.

brew cask install chromedriver

For Linux and Windows refer to this.

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

python3 youtube-dl-watch-later-playlist.py

Usage Input Screenshot

Usage Wrong Input Screenshot

Customize

download_folder = '~/Downloads/'

Known Issues

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