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 不同系统编译兼容问题
  • ¥100 三相直流充电模块对数字电源芯片在物理上它必须具备哪些功能和性能?
  • ¥30 数字电源对DSP芯片的具体要求
  • ¥20 antv g6 折线边如何变为钝角
  • ¥30 如何在Matlab或Python中 设置饼图的高度
  • ¥15 nginx中的CORS策略应该如何配置
  • ¥30 信号与系统实验:采样定理分析
  • ¥100 我想找人帮我写Python 的股票分析代码,有意请加mathtao
  • ¥20 Vite 打包的 Vue3 组件库,图标无法显示
  • ¥15 php 同步电商平台多个店铺增量订单和订单状态