且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

*** API v3无法从频道检索所有视频

更新时间:2023-02-21 08:07:08

基本上,您正在使用相同的title处理两个不同的通道,但这是可以接受的,因为customUrl有所不同,以下详细信息:

Basically you're dealing with two different channels with the same title but this is acceptable because of the customUrls are different, here the details:

GET https://www.googleapis.com/***/v3/channels?part=snippet%2CcontentDetails%2Cstatistics&id=UChTMiw43iw4w-ggOEXmPtfg&key={YOUR_API_KEY}

``` json 
{
    "title": "DharmaYogaCenter",
    "description": "We are a full yoga center located in Bremerton Washington.  We believe yoga and meditation is for everyone.  Stop by our Yoga Center and enjoy a blissful meditation, yoga class or just some good community.  We offer many free classes every month.  www.dharmayogacenter.net",
    "customUrl": "DharmaYogaCenter",
    "publishedAt": "2009-06-11T21:43:56.000Z",
    ...
    "relatedPlaylists": {
     "uploads": "UChTMiw43iw4w-ggOEXmPtfg",
    ...
    "videoCount": "9"
    ...
```

您可以在此处检查仅有几部视频:在UC8hnoz74NP5V5sxkuxXk2kA频道中上传了视频/a>

You can check there are only few videos in here: uploaded videos in channel UC8hnoz74NP5V5sxkuxXk2kA

GET https://www.googleapis.com/***/v3/channels?part=contentDetails&id=UChTMiw43iw4w-ggOEXmPtfg&key={YOUR_API_KEY} 获取频道的"uploads": "UUhTMiw43iw4w-ggOEXmPtfg"

获取> https ://www.googleapis.com/***/v3/playlistItems?part = snippet& maxResults = 50& playlistId = UUhTMiw43iw4w-ggOEXmPtfg& key = {YOUR_API_KEY}

GET https://www.googleapis.com/***/v3/playlistItems?part=snippet&maxResults=50&playlistId=UUhTMiw43iw4w-ggOEXmPtfg&key={YOUR_API_KEY}

{
 "kind": "***#playlistItemListResponse",
 "etag": "\"XI7nbFXulYBIpL0ayR_gDh3eu1k/yvjEzYc-CE8RBoXkFDTMPf_O1XM\"",
 "pageInfo": {
  "totalResults": 9,
  "resultsPerPage": 50
 },...

2. TheDharmaTube:UC8hnoz74NP5V5sxkuxXk2kA-标题:DharmaYogaCenter

GET https://www.googleapis.com/***/v3/channels?part=snippet%2CcontentDetails%2Cstatistics&id=UC8hnoz74NP5V5sxkuxXk2kA&key={YOUR_API_KEY}

2. TheDharmaTube: UC8hnoz74NP5V5sxkuxXk2kA - title: DharmaYogaCenter

GET https://www.googleapis.com/***/v3/channels?part=snippet%2CcontentDetails%2Cstatistics&id=UC8hnoz74NP5V5sxkuxXk2kA&key={YOUR_API_KEY}

{ 
    "title": "DharmaYogaCenter",
    "description": "Be receptive",
    "customUrl": "TheDharmaTube",
    "publishedAt": "2011-02-24T22:54:31.000Z",
    ...
    "relatedPlaylists": {
     "uploads": "UU8hnoz74NP5V5sxkuxXk2kA",
    ...
    "videoCount": "142"

您可以在此处检查更多视频:在UC8hnoz74NP5V5sxkuxXk2kA频道中上传了视频a> ..向下滚动即可打开,以加载所有视频

You can check there are a lot more videos in here: uploaded videos in channel UC8hnoz74NP5V5sxkuxXk2kA ..scroll down once opened to load all the videos

GET https://www.googleapis.com/***/v3/channels?part=contentDetails&id=UC8hnoz74NP5V5sxkuxXk2kA&key={YOUR_API_KEY} 获取频道的"uploads": "UU8hnoz74NP5V5sxkuxXk2kA"

获取>:///www.googleapis.com/***/v3/playlistItems?part=snippet&maxResults=50&playlistId=UU8hnoz74NP5V5sxkuxXk2kA&key= {YOUR_API_KEY} "totalResults":142,

GET https://www.googleapis.com/***/v3/playlistItems?part=snippet&maxResults=50&playlistId=UU8hnoz74NP5V5sxkuxXk2kA&key={YOUR_API_KEY} "totalResults": 142,

{
 "kind": "***#playlistItemListResponse",
 "etag": "\"XI7nbFXulYBIpL0ayR_gDh3eu1k/jm3DhRxnqdMzu1DGtIoiLbpEFY4\"",
 "nextPageToken": "CDIQAA",
 "pageInfo": {
  "totalResults": 142,
  "resultsPerPage": 50
 },...