gpt4 book ai didi

javascript - 通过 API 提取 Nerd 的 youtube 统计信息

转载 作者:行者123 更新时间:2023-11-30 14:59:04 31 4
gpt4 key购买 nike

是否有可用的 youtube API 来获取 Nerd 的统计信息?

stats for nerds data

我四处寻找统计数据,但他们指出 viewCount、likeCount 等。我特别在寻找通过右键单击视频获得的 Nerd 数据的统计数据。

   URL: https://www.googleapis.com/youtube/v3/videos?id=7lCDEYXw3mM&key=YOUR_API_KEY
&part=snippet,statistics&fields=items(id,snippet,statistics)

Description: This example adds the fields parameter to remove all
kind and etag properties from the API response.

API response:

{
"videos": [
{
"id": "7lCDEYXw3mM",
"snippet": {
"publishedAt": "2012-06-20T22:45:24.000Z",
"channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
"title": "Google I/O 101: Q&A On Using Google APIs",
"description": "Antonio Fuentes speaks to us and takes questions on working with Google APIs and OAuth 2.0.",
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/default.jpg"
},
"medium": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/mqdefault.jpg"
},
"high": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/hqdefault.jpg"
}
},
"categoryId": "28"
},
"statistics": {
"viewCount": "3057",
"likeCount": "25",
"dislikeCount": "0",
"favoriteCount": "17",
"commentCount": "12"
}
}
]
}

最佳答案

检查 Resource representation of Videos ,如果您正在寻找 Nerd 的统计数据。可以获得如下数据:

{
"kind": "youtube#video",
"etag": etag,
"id": string,
...
"fileDetails": {
"fileName": string,
"fileSize": unsigned long,
"fileType": string,
"container": string,
"videoStreams": [
{
"widthPixels": unsigned integer,
"heightPixels": unsigned integer,
"frameRateFps": double,
"aspectRatio": double,
"codec": string,
"bitrateBps": unsigned long,
"rotation": string,
"vendor": string
}
],
"audioStreams": [
{
"channelCount": unsigned integer,
"codec": string,
"bitrateBps": unsigned long,
"vendor": string
}
],
"durationMs": unsigned long,
"bitrateBps": unsigned long,
"creationTime": string
},
"processingDetails": {
"processingStatus": string,
"processingProgress": {
"partsTotal": unsigned long,
"partsProcessed": unsigned long,
"timeLeftMs": unsigned long
},
"processingFailureReason": string,
"fileDetailsAvailability": string,
"processingIssuesAvailability": string,
"tagSuggestionsAvailability": string,
"editorSuggestionsAvailability": string,
"thumbnailsAvailability": string
},
...
}

关于javascript - 通过 API 提取 Nerd 的 youtube 统计信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46819958/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com