Python script to download YouTube videos from your Watch Later Playlist
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
.
To get a local copy up and running follow these simple steps.
# 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.
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
python3 youtube-dl-watch-later-playlist.py
google username
and your google password
stackoverflow.com
with your Google credentials.download_folder = '~/Downloads/'
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Distributed under the MIT License. See LICENSE
for more information.