This commit is contained in:
parent
e9367deda6
commit
7adf6175a1
14
README.md
14
README.md
@ -1,17 +1,19 @@
|
|||||||
# youtube_newest_video_from_channel
|
# 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
|
Small Python script to get the latest video from a specific Youtube channel and returns it's title and url
|
||||||
|
|
||||||
|
[![Build Status](https://drone.pyas.de/api/badges/Kim/youtube_get_newest_video_from_channel/status.svg)](https://drone.pyas.de/Kim/youtube_get_newest_video_from_channel)
|
||||||
|
|
||||||
* You need to get an API Key for the [Youtube Data API V3](https://console.developers.google.com/) -> Create a project, then add a key to it
|
* You need to get an API Key for the [Youtube Data API V3](https://console.developers.google.com/) -> Create a project, then add a key to it
|
||||||
* The Channel ID -> May be Part of the URL if you go to the channel (after 'https://www.youtube.com/channel/' and before the first '?&'
|
* The Channel ID -> May be Part of the URL if you go to the channel (after 'https://www.youtube.com/channel/' and before the first '?&'
|
||||||
|
|
||||||
**Hint:**
|
**Hint:**
|
||||||
|
|
||||||
Nowadays the channel url not always shows the channel id, but sometimes the channel name.
|
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
|
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.
|
||||||
Requires '_requests_' to work.
|
|
||||||
|
|
||||||
## Usage example
|
## Usage example
|
||||||
````python
|
````python
|
||||||
@ -20,7 +22,7 @@ from GetLatestVideo import API
|
|||||||
# Add your Youtube Data API V3 Key here
|
# Add your Youtube Data API V3 Key here
|
||||||
API_KEY = ''
|
API_KEY = ''
|
||||||
|
|
||||||
# Add the Channel IDs here
|
# 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
|
# When you only know the channel name you can get the ID from here https://commentpicker.com/youtube-channel-id.php
|
||||||
CHANNEL_ID = [
|
CHANNEL_ID = [
|
||||||
'ID1',
|
'ID1',
|
||||||
@ -35,4 +37,4 @@ for channel in CHANNEL_ID:
|
|||||||
videos.append(yt.get_latest_video(channel))
|
videos.append(yt.get_latest_video(channel))
|
||||||
|
|
||||||
print(videos)
|
print(videos)
|
||||||
````
|
````
|
||||||
|
Loading…
Reference in New Issue
Block a user