droos02800 2015-09-14 19:29
浏览 63
已采纳

单个视频无法在Youtube API标题搜索中获取

I'm using Youtubes PHP API to get videos by title and list them on a page based on the current date. Right now one video is not showing and I cannot figure out how to debug the issue.

https://www.youtube.com/watch?v=F94TV1yZ9NA

I've tried searching the channel specifically using Search: list with vague keywords in the title and the whole title but it won't pick it up.

I thought perhaps it could be a setting for the uploaded video but it seems identical to the others. Anyone ever have an issue similar to this?

  • 写回答

1条回答 默认 最新

  • duanfangfei5558 2015-09-15 10:01
    关注

    Which piece of data are you looking for?

    GET https://www.googleapis.com/youtube/v3/videos?part=snippet&id=F94TV1yZ9NA&key={YOUR_API_KEY}
    

    Returns both the title and publishedAt date

    {
       "kind": "youtube#videoListResponse",
       "etag": "\"jOXstHOM20qemPbHbyzf7ztZ7rI/KQPGXJ3y5hdArWxw_-IKv1yQJV0\"",
       "pageInfo": {
       "totalResults": 1,
       "resultsPerPage": 1
    },
     "items": [
    {
    
    
     "kind": "youtube#video",
     "etag": "\"jOXstHOM20qemPbHbyzf7ztZ7rI/5z-phmMy-V7_yf9pGOHrr3cYshs\"",
     "id": "F94TV1yZ9NA",
     "snippet": {
      "publishedAt": "2015-09-13T22:40:04.000Z",
      "channelId": "UCkhBqbxs8CbO-vYxKROF73g",
      "title": "CDP 2015 September 12 R11",
      "description": "Located at 21 Exhibition Drive in Charlottetown, RED SHORES Racetrack & Casino at Charlottetown Driving Park combines the excitement of live harness & simulcast racing, slots, poker, food and fun in one 'RED HOT' bundle of entertainment - all done Island style!
    
    Located at 55 Greenwood Drive in Summerside, RED SHORES at Summerside Raceway also offers a RED HOT entertainment package, featuring live & simulcast racing, a gaming floor with 40 slots and live Texas Hold'em Poker tables, plus, casual food & drink in the WEST-END Bar & Grill
    
    Redshores.ca",
      "thumbnails": {
    

    https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.videos.list?part=snippet&id=F94TV1yZ9NA&_h=2&

    EDIT:

    If you do a search for the first 20 videos published after 1st September 2015:

    GET https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UCkhBqbxs8CbO-vYxKROF73g&maxResults=20&order=date&publishedAfter=2015-09-01T00%3A00%3A00.000Z&key={YOUR_API_KEY}
    

    the videoID you mentioned (F94TV1yZ9NA) is returned

    Try it

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料