Created
November 11, 2023 18:56
-
-
Save smkplus/b9421b79b23d8abe3500b5e10c249386 to your computer and use it in GitHub Desktop.
YoutubePlaylistLinks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pytube import Playlist, YouTube | |
# YouTube Playlist URL | |
playlist_url = 'playlist_URL' # Replace with your playlist URL | |
# Get the playlist object | |
playlist = Playlist(playlist_url) | |
# Iterate through the videos in the playlist | |
for video_url in playlist.video_urls: | |
# Create a YouTube object for the video | |
yt = YouTube(video_url) | |
print(video_url) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment