Small Python script to get the latest video from a specific Youtube channel
Go to file
Kim e9367deda6
All checks were successful
continuous-integration/drone/push Build is passing
fix .drone.yml
2021-09-13 22:03:08 +02:00
.drone.yml fix .drone.yml 2021-09-13 22:03:08 +02:00
example.py separated Class File and example usage code 2020-12-02 11:26:13 +01:00
GetLatestVideo.py separated Class File and example usage code 2020-12-02 11:23:23 +01:00
LICENSE Initial commit 2017-10-07 18:32:32 +02:00
README.md added usage example 2020-12-02 11:29:29 +01:00
requirements.txt add requirements.txt 2020-11-22 16:18:41 +01:00

youtube_newest_video_from_channel

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

Hint:

Nowadays the channel url not always shows 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

Requires 'requests' to work.

Usage example

from GetLatestVideo import API

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

# Add the Channel IDs 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)