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 需要数据库运行的图片
  • ¥15 如何获取vue-video-editor?
  • ¥100 vs2019 mfc程序如何实现64*64/48*48大小的真彩色工具栏
  • ¥15 全志v3s耳机音频输出口怎么外接功放
  • ¥15 华为ensp使用基本ACL限制公司网络访问
  • ¥15 帮我做下照片上的PLC题
  • ¥15 labview2022 使用modbus报缺少依赖?
  • ¥15 谷歌地图是不是不开通结算功能,api会使用不了哦
  • ¥15 unity腾讯云对象存储机型适配
  • ¥15 求全国交通咨询模拟代码,要求如下,可以完全在dev c++运行