Download a playlist from youtube

There is again an error in pytube 9.5.1. We wish it can be soon fixed. Stay tuned (14/07/2019).

Dowload a playlilst from youtube

Now the error should be fixed in version 9.5.1. If you want to download a full playlist:

from pytube import Playlist
pl = Playlist("https://www.youtube.com/watch?v=B0AIcf2v_34&list=PL_38rYkBIiiWPXx3C_aIATYnnbCTDByHy")
pl.download_all()

Download one video only

from pytube import YouTube

yt = YouTube("https://youtu.be/kltSA06EJhc?list=PL_38rYkBIiiWPXx3C_aIATYnnbCTDByHy")
print(yt.title)
stream = yt.streams.first()
stream.download()

 

Published by pythonprogramming

Started with basic on the spectrum, loved javascript in the 90ies and python in the 2000, now I am back with python, still making some javascript stuff when needed.