Python tutorial – youtube videos playlist downloader
Youtube videos playlist downloader
This will download all the links of the youtube playlist.
import textwrap from pytube import Playlist p = Playlist('https://www.youtube.com/playlist?list=PLtBRGVOL9cNuM9SZJ_VLdJsjDfhBib7iO') title=p.title textwrap.shorten(title, width=12) f = open(title+"3.txt", "w") print(f'Downloading: {p.title}') for url in p.video_urls: #for url in p.video_urls[:3]: f.write("\""+url+"\","+"\n") print(url) f.close() import textwrap from pytube import Playlist p = Playlist('https://www.youtube.com/playlist?list=PLtBRGVOL9cNuM9SZJ_VLdJsjDfhBib7iO') title=p.title textwrap.shorten(title, width=12) f = open(title+"3.txt", "w") print(f'Downloading: {p.title}') for url in p.video_urls: #for url in p.video_urls[:3]: f.write("\""+url+"\","+"\n") print(url) f.close()