├── README.md └── YTD.py /README.md: -------------------------------------------------------------------------------- 1 | # DownloadPlaylistFromYouTube-Python 2 | 3 | 1- install python on your device 4 |
5 | 2- before run this code , Add [ pip install pytube ] in command line. 6 | -------------------------------------------------------------------------------- /YTD.py: -------------------------------------------------------------------------------- 1 | from pytube import Playlist 2 | playlist = Playlist('Set PlayList URL Here') 3 | # DOWNLOAD_DIR = 'D:\Downloads' 4 | print(f'Downloading: {playlist.title}') 5 | print('Number of videos in playlist: %s' % len(playlist.video_urls)) 6 | 7 | for video in playlist.videos: 8 | print(video.title) 9 | st = video.streams.get_highest_resolution() 10 | st.download() 11 | # video.streams.first().download() 12 | --------------------------------------------------------------------------------