Youtube视频id(或URL)至;“用户”;及;频道;

Youtube视频id(或URL)至;“用户”;及;频道;,youtube,youtube-api,youtube-data-api,android-youtube-api,youtube-channels,Youtube,Youtube Api,Youtube Data Api,Android Youtube Api,Youtube Channels,给定Youtube视频的URL或ID,是否可以获取(1)上传该视频的“用户”的名称和(2)该视频所属的频道?如果是,API请求是什么 例如,假设我有一个视频ID:“VulCl5QfewE”,对应于以下位置的视频: 然后我想提取用户的名字,它是:“TheYoungTurks”,用户的URL是: 我还希望能够提取频道的名称,即:“UC1yBKRuGpC1tSM73A0ZjYjQ”,频道的URL为: 最后,(作为一个“附带问题”),我有点困惑“频道”和“用户”之间的区别是什么。一个用户可以有多个频

给定Youtube视频的URL或ID,是否可以获取(1)上传该视频的“用户”的名称和(2)该视频所属的频道?如果是,API请求是什么

例如,假设我有一个视频ID:“VulCl5QfewE”,对应于以下位置的视频:

  • 然后我想提取用户的名字,它是:“TheYoungTurks”,用户的URL是:

  • 我还希望能够提取频道的名称,即:“UC1yBKRuGpC1tSM73A0ZjYjQ”,频道的URL为:

  • 最后,(作为一个“附带问题”),我有点困惑“频道”和“用户”之间的区别是什么。一个用户可以有多个频道吗?我确实读过这里的链接:但我试图理解它背后的用例


    Cheers

    如果要从videoId检索频道信息,需要使用带有以下参数的ressource:

    part: snippet
    id: "VulCl5QfewE" //for example
    
    GET https://www.googleapis.com/youtube/v3/videos?part=snippet&id=VulCl5QfewE&key={YOUR_API_KEY}
    
    结果显示用户的channelID:

     "items": [
      {
    
       "kind": "youtube#video",
       "etag": "\"iDqJ1j7zKs4x3o3ZsFlBOwgWAHU/IcNtD4uunskZTQuIeM0YQRcc5HY\"",
       "id": "VulCl5QfewE",
       "snippet": {
        "publishedAt": "2015-08-05T01:11:24.000Z",
        "channelId": "UC1yBKRuGpC1tSM73A0ZjYjQ",
    
    然后使用此信息通过ressource
    channel.list获取频道名称

    part: snippet
    id: UC1yBKRuGpC1tSM73A0ZjYjQ
    
    GET https://www.googleapis.com/youtube/v3/channels?part=snippet&id=UC1yBKRuGpC1tSM73A0ZjYjQ&key={YOUR_API_KEY}
    
    部分结果是:

      "snippet": {
        "title": "The Young Turks",
        "description": "The Largest Online News Show in the World. Hosted by Cenk Uygur & Ana Kasparian. LIVE weekdays 6-8pm ET. \n\nYoung Turk (n), 1. Young progressive or insurgent member of an institution, movement, or political party. 2. Young person who rebels against authority or societal expectations. (American Heritage Dictionary)\n\nThe Young Turks were the first original talk show on Sirius satellite radio and the first live, daily webcast on the internet. But that is not the revolution.\n\nWe are a rare show that combines all of the news that people care about in one place. We are not afraid to talk about politics and entertainment and sports and pop culture. But that is not the revolution either. \n\nGet The Young Turks\u200b Mobile App Today! \n\nDownload the iOS version here: https://itunes.apple.com/us/app/the-young-turks/id412793195? \n\nDownload the Android version here: https://play.google.com/store/apps/details?id=com.tyt",
        "publishedAt": "2005-12-21T20:46:51.000Z",
    
    最后,(作为一个“附带问题”),我有点困惑什么是 “频道”和“用户”之间的区别。用户可以拥有 多频道?我确实读过这里的链接: 但我试图理解它背后的用例


    有一个与Google+帐户的链接,请检查

    以了解上下文,给定一个视频,我正在尝试获取该用户最近上传的5个内容。所以你说的是,如果我从这个频道得到5次最新的上传,它是一样的吗?在任何情况下,是否有办法获取用户名,因为上面的示例同时包含用户名和频道名。“有办法获取用户名吗?”?我给你的方法,我不理解这个问题。“5次最新上传”使用
    视频。使用频道的channelID列出