How do I search content across multiple YouTube channels?

I want to search for youtube videos in the channel list. In the code below, I can only transfer one "Channelid" to apt youtube. Is there a way to pass multiple channel IDs?

def youtube_search(options):
  youtube = build(YOUTUBE_API_SERVICE_NAME, YOUTUBE_API_VERSION,
    developerKey=DEVELOPER_KEY)

  # Call the search.list method to retrieve results matching the specified
  # query term.
  search_response = youtube.search().list(
    q=options.q,
    part="id,snippet",
    maxResults=options.max_results,
    channelId=options.channelId
  ).execute() 
+4
source share
2 answers

You cannot add channels separated by commas. Either you can leave it blank for searching all channels, or you can get a request for each channel and combine the results. No multi-channel search API.

+2
source

@Ibrahim , ChannelID . - . , , ChannelID . , , .

0

Source: https://habr.com/ru/post/1526090/


All Articles