youtube_get_newest_video_fr.../README.md
Kim Oliver Drechsel 815f9c9fcd
All checks were successful
continuous-integration/drone/push Build is passing
„README.md“ ändern
2021-09-21 22:00:11 +02:00

1.5 KiB

youtube_get_newest_video_from_channel

Small Python script to get the latest video from a specific Youtube channel and returns it's title and url

Build Status

Hint:

Nowadays the channel url doesn't always show the channel id, but sometimes the channel name. However the script needs the channel id. You can get the id from here when you only have the channel name: https://commentpicker.com/youtube-channel-id.php A channel id looks like this UCmpilcSVu1T-AsAiiHbfpcA

Requires python module 'requests' to work.

Usage example

from GetLatestVideo import API

# Add your Youtube Data API V3 Key here
API_KEY = ''

# Add the Channel ID(s) here,
# When you only know the channel name you can get the ID from here https://commentpicker.com/youtube-channel-id.php
CHANNEL_ID = [
    'ID1',
    'ID2'
]

videos = []

yt = API(API_KEY)

for channel in CHANNEL_ID:
    videos.append(yt.get_latest_video(channel))

print(videos)

Credits

Repo Icon made by Freepik from www.flaticon.com