YouTube API反映了错误的内容

时间:2017-06-07 17:41:17

标签: youtube-api youtube-data-api

我们正尝试使用v3数据API中的搜索端点为YouTube上的#smartson标签添加帖子。

但是,以下两个帖子未出现在API结果中:

(1)https://www.youtube.com/watch?v=F93wt8fZ-vE

(2)https://www.youtube.com/watch?v=BIWXU3IsssY

如果您同时关注这些链接并查看说明部分,您会注意到它们都包含#smartson标签作为说明的第一个单词。但是,在搜索该主题标签时,它们不会显示在API结果中。

但是,我可以通过查找发布这些帖子的频道来检索这些帖子(使用YouTube频道终结点)。以下是我回复这两篇文章的回复:

    {  
       "kind":"youtube#searchResult",
       "etag":"\"m2yskBQFythfE4irbTIeOgYYfBU/OIp6j6IiBd2nWkNA4H-3Dj6xGtw\"",
       "id":{  
          "kind":"youtube#video",
          "videoId":"BIWXU3IsssY"
       },
       "snippet":{  
          "publishedAt":"2017-06-05T10:47:48.000Z",
          "channelId":"UCYEsDVnEY3xiuuzDFW6g41w",
          "title":"clasohlsonworkwea",
          "description":"smartson #clasohlsonworkwear #testimonial Sitter jätte bra men lite för små knäskydd.",
          "thumbnails":{  
             "default":{  
                "url":"https://i.ytimg.com/vi/BIWXU3IsssY/default.jpg",
                "width":120,
                "height":90
             },
             "medium":{  
                "url":"https://i.ytimg.com/vi/BIWXU3IsssY/mqdefault.jpg",
                "width":320,
                "height":180
             },
             "high":{  
                "url":"https://i.ytimg.com/vi/BIWXU3IsssY/hqdefault.jpg",
                "width":480,
                "height":360
             }
          },
          "channelTitle":"Jörgen Lyckebay",
          "liveBroadcastContent":"none"
       }
    },
    {  
       "kind":"youtube#searchResult",
       "etag":"\"m2yskBQFythfE4irbTIeOgYYfBU/CaSiQ6lYASTi7Eia0cHbF9Gwkz4\"",
       "id":{  
          "kind":"youtube#video",
          "videoId":"F93wt8fZ-vE"
       },
       "snippet":{  
          "publishedAt":"2017-06-05T08:21:06.000Z",
          "channelId":"UCYEsDVnEY3xiuuzDFW6g41w",
          "title":"clasohlsonworkwear",
          "description":"smartson #clasohlsonworkwear #testimonial Första testet med byxorna o klev på knapparna gör om som f..",
          "thumbnails":{  
             "default":{  
                "url":"https://i.ytimg.com/vi/F93wt8fZ-vE/default.jpg",
                "width":120,
                "height":90
             },
             "medium":{  
                "url":"https://i.ytimg.com/vi/F93wt8fZ-vE/mqdefault.jpg",
                "width":320,
                "height":180
             },
             "high":{  
                "url":"https://i.ytimg.com/vi/F93wt8fZ-vE/hqdefault.jpg",
                "width":480,
                "height":360
             }
          },
          "channelTitle":"Jörgen Lyckebay",
          "liveBroadcastContent":"none"
       }
    },
    {  
       "kind":"youtube#searchResult",
       "etag":"\"m2yskBQFythfE4irbTIeOgYYfBU/EYuQkgOEkur8iziKcJuAx76XkmU\"",
       "id":{  
          "kind":"youtube#video",
          "videoId":"pW_RJqX0WGM"
       },
       "snippet":{  
          "publishedAt":"2017-04-26T15:41:54.000Z",
          "channelId":"UCYEsDVnEY3xiuuzDFW6g41w",
          "title":"Båt motor",
          "description":"Renoverad båtmotor 2.",
          "thumbnails":{  
             "default":{  
                "url":"https://i.ytimg.com/vi/pW_RJqX0WGM/default.jpg",
                "width":120,
                "height":90
             },
             "medium":{  
                "url":"https://i.ytimg.com/vi/pW_RJqX0WGM/mqdefault.jpg",
                "width":320,
                "height":180
             },
             "high":{  
                "url":"https://i.ytimg.com/vi/pW_RJqX0WGM/hqdefault.jpg",
                "width":480,
                "height":360
             }
          },
          "channelTitle":"Jörgen Lyckebay",
          "liveBroadcastContent":"none"
       }
}

在该API响应中,描述仅以单词" smartson,"开头。不是标签。

有关API未与公共YouTube.com链接同步的原因的任何见解?

1 个答案:

答案 0 :(得分:0)

使用Videos.list。试了一下它并没有忽略标签。

在API资源管理器中尝试过,这就是我所得到的:

"description": " . . .Tap tap tap.\n\n######tapper\n#hashtag\n#dont ignore\n##doublehashtag",

youtube api返回完整描述,没有任何遗漏。