Youtube空频道按(https://www.googleapis.com/youtube/v3/channels)中的categoryId列出

时间:2019-03-17 15:17:24

标签: list youtube categories channel

我尝试获取基于类别的频道列表。 但是,我无法得到正确的结果。 如果使用类别ID,则结果如下。

https://www.googleapis.com/youtube/v3/channels?key={mykey}&categoryId=GCQ3JlYXRvciBvbiB0aGUgUmlzZQ&part=id%2Csnippet%2Cstatistics&maxResults=20

{
  "kind": "youtube#channelListResponse",
  "etag": "\"XpPGQXPnxQJhLgs6enD_n8JR4Qk/x39_b2qYrj00aNAg_uPJGscKqEY\"",
  "pageInfo": {
    "totalResults": 0,
    "resultsPerPage": 20
  },
  "items": []
}

如果使用频道ID,则结果通常是结果。

https://www.googleapis.com/youtube/v3/channels?key{mykey}&id=UClHt0HiKFKou97tG8SWjXcA&part=id%2Csnippet%2Cstatistics&maxResults=20

{
  "kind": "youtube#channelListResponse",
  "etag": "\"XpPGQXPnxQJhLgs6enD_n8JR4Qk/KQbdZlN4p7P3lGTL9c0zM03ewNE\"",
  "pageInfo": {
    "totalResults": 1,
    "resultsPerPage": 1
  },
  "items": [
    {
      "kind": "youtube#channel",
      "etag": "\"XpPGQXPnxQJhLgs6enD_n8JR4Qk/WBUtB30UZzf3m29j13c2d8pxUIQ\"",
      "id": "UClHt0HiKFKou97tG8SWjXcA",
      "snippet": {
        "title": "XXXXXXX",
        "description": "",
        "publishedAt": "2019-01-05T15:50:26.000Z",
        "thumbnails": {
          "default": {
            "url": "https://yt3.ggpht.com/a-/AAuE7mDFBgjx02mhCJMDxnpriB8c3J5k2z55UNfZgQ=s88-mo-c-c0xffffffff-rj-k-no",
            "width": 88,
            "height": 88
          },
          "medium": {
            "url": "https://yt3.ggpht.com/a-/AAuE7mDFBgjx02mhCJMDxnpriB8c3J5k2z55UNfZgQ=s240-mo-c-c0xffffffff-rj-k-no",
            "width": 240,
            "height": 240
          },
          "high": {
            "url": "https://yt3.ggpht.com/a-/AAuE7mDFBgjx02mhCJMDxnpriB8c3J5k2z55UNfZgQ=s800-mo-c-c0xffffffff-rj-k-no",
            "width": 800,
            "height": 800
          }
        },
        "localized": {
          "title": "XXXXXXX",
          "description": ""
        },
        "country": "KR"
      },
      "statistics": {
        "viewCount": "687",
        "commentCount": "0",
        "subscriberCount": "53",
        "hiddenSubscriberCount": false,
        "videoCount": "9"
      }
    }
  ]
}

我想按类别ID获取频道列表。 如何通过类别ID获取频道列表?

0 个答案:

没有答案