有人知道如何获取每个频道的“所有顶,踩,评论”计数。 (不是每个视频)。 当然,解决方法可能是拨打大量电话并通过每个视频收集所有信息,但是应该有更聪明的方法。
目前,我只能抓到:
{
"kind": "youtube#channelListResponse",
"etag": "\"DuHzAJ-eQIiCIp7p4ldoVcVAOeY/gV5INvDRXUuR7M5HU7r3Vgp9KxI\"",
"pageInfo": {
"totalResults": 1,
"resultsPerPage": 5
},
"items": [
{
"kind": "youtube#channel",
"etag": "\"DuHzAJ-eQIiCIp7p4ldoVcVAOeY/Bsi6Hb1DkT1a7bnIhxS6aHiWymQ\"",
"id": "UC9gzynCiyB7tQmdZ-p2a_nw",
"snippet": {
"title": "Дмитрий Шилов",
"description": "Зайди и подпишись на наш развлекательный канал, подними себе настроение)",
"customUrl": "Budenyi80",
"publishedAt": "2010-02-01T00:44:44.000Z",
"thumbnails": {
"default": {
"url": "https://yt3.ggpht.com/-r6mSusF_X50/AAAAAAAAAAI/AAAAAAAAAAA/26VcgWvTFPQ/s88-c-k-no-mo-rj-c0xffffff/photo.jpg",
"width": 88,
"height": 88
},
"medium": {
"url": "https://yt3.ggpht.com/-r6mSusF_X50/AAAAAAAAAAI/AAAAAAAAAAA/26VcgWvTFPQ/s240-c-k-no-mo-rj-c0xffffff/photo.jpg",
"width": 240,
"height": 240
},
"high": {
"url": "https://yt3.ggpht.com/-r6mSusF_X50/AAAAAAAAAAI/AAAAAAAAAAA/26VcgWvTFPQ/s800-c-k-no-mo-rj-c0xffffff/photo.jpg",
"width": 800,
"height": 800
}
},
"localized": {
"title": "Дмитрий Шилов",
"description": "Зайди и подпишись на наш развлекательный канал, подними себе настроение)"
},
"country": "RU"
},
"contentDetails": {
"relatedPlaylists": {
"likes": "LL9gzynCiyB7tQmdZ-p2a_nw",
"uploads": "UU9gzynCiyB7tQmdZ-p2a_nw",
"watchHistory": "HL",
"watchLater": "WL"
}
},
"statistics": {
"viewCount": "212372633",
"commentCount": "0",
"subscriberCount": "596586",
"hiddenSubscriberCount": false,
"videoCount": "893"
}
}
]
}
答案 0 :(得分:2)
您可以使用youtube Reporting API。
另一种方法是循环播放视频,以防万一example。
答案 1 :(得分:1)
您可以使用Videos.list传递videoId并将'statistics'用于'part'属性。那应该检索以下指标:viewCount,likeCount,dislikeCount,favouriteCount,commentCount。 样本回复:
'AMAZON.FallbackIntent': function (intent, session, response) {
response.ask("Optimus Prime didn't get that one....","");
}