python list all youtube channel videos 1

python list all youtube channel videos

#pip install scrapetube

import scrapetube

videos = scrapetube.get_channel("UC9-y-6csu5WGm29I7JiwpnA")

for video in videos:
    print(video['videoId'])

Here is what the above code is Doing:
1. Importing the scrapetube module
2. Getting the videos from the channel “UC9-y-6csu5WGm29I7JiwpnA”
3. Printing the videoId of each video

The videoId is the unique identifier for each video.

You can also get the videoId from the URL of the video.

For example, the videoId of this video:

is:
dQw4w9WgXcQ

Similar Posts