I'm attempting to download videos from a particular YouTube channel. I am starting with the video_id and trying to work back unsuccessfully to get to the channel_id, and then eventually a listing of videos on the channel.
Here is my code:
def gather_videos(api_key):
youtube = build('youtube', 'v3', developerKey=api_key)
video_id = [video_id]
request = youtube.videos().list(
part=['statistics', 'contentDetails', 'snippet', 'id'],
id=video_id
)
response = request.execute()
From this, I am able to retrieve the channel_id in the response (json), but I cannot seem to make the link to an API call to retrive the full listing. I have reviewed the API documentation here (https://developers.google.com/youtube/v3/docs/channels/list), but I am a novice at interpreting the details. Is it even possible to go this route? Or will I need to conduct a search? Or perhaps use the fact I am subscribed to the channel and try to obtain the listing this way?