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 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同
  • ¥50 如何openEuler 22.03上安装配置drbd
  • ¥20 ING91680C BLE5.3 芯片怎么实现串口收发数据
  • ¥15 无线连接树莓派,无法执行update,如何解决?(相关搜索:软件下载)
  • ¥15 Windows11, backspace, enter, space键失灵