gdata youtube feed for auto-generated channels

前端 未结 1 921
清歌不尽
清歌不尽 2021-02-06 07:49

I\'m trying to figure out if it\'s possible to get a gdata feed for an auto-generated youtube channel, aka a \"Topic.\"

For example, here\'s the JPop Channel:

相关标签:
1条回答
  • 2021-02-06 08:30

    You can interact with auto-generated topic channels (those that begin with HC) by subscribing to them like any other channel.

    If you just want to get a list of videos associated with the channel, though, you need to use the forthcoming v3 of the API, and you can do a search based on the underlying topic. You can get the topic id(s) related to a given channel using channels.list(id=CHANNEL_ID):

    https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.channels.list?part=topicDetails&id=HC9BkB0bbvR-4

    (v3 isn't publicly released as of right now, so you need to use the Google APIs Explorer.)

    That returns (Freebase) topic id /m/025g__, which you can then use to do a search.list(topicId=TOPIC_ID, q=BLAH, type=video)

    https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.search.list?part=snippet&type=video&q=j+pop&topicId=%252Fm%252F025g__
    

    Unfortunately, you can't do a search that just specifies a topicId= without a q= right now in v3, but that's a bug that will hopefully be fixed soon. So you do need to specify something meaningful for the q= parameter for the time being, and I'm just using j pop.

    0 讨论(0)
提交回复
热议问题