【问题标题】:YouTube Data API v3 Search Missing VideosYouTube Data API v3 搜索缺失的视频
【发布时间】:2020-01-21 21:07:58
【问题描述】:

我正在尝试使用 youtube.search.list API 方法访问频道“UC8-Th83bH_thdKZDJCrn88g”的最新视频,但是我得到的结果与我在页面上看到的不同。

按照文档:

GET https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UC8-Th83bH_thdKZDJCrn88g&maxResults=10&order=date&type=video&fields=items(id(videoId),snippet(channelId,publishedAt,title))&key={YOUR_API_KEY}

{
 "items": [
  {
   "id": {
    "videoId": "BY4cV6B25fQ"
   },
   "snippet": {
    "publishedAt": "2019-09-19T09:00:00.000Z",
    "channelId": "UC8-Th83bH_thdKZDJCrn88g",
    "title": "Nick Kroll Shares His Impressions of Dogs, Sheep and French Dolphins"
   }
  },
  {
   "id": {
    "videoId": "iVx7gzO17gA"
   },
   "snippet": {
    "publishedAt": "2019-09-19T03:40:47.000Z",
    "channelId": "UC8-Th83bH_thdKZDJCrn88g",
    "title": "Wheel of Impressions with Nick Kroll"
   }
  },
  {
   "id": {
    "videoId": "yNiHAm0fVME"
   },
   "snippet": {
    "publishedAt": "2019-09-13T10:30:02.000Z",
    "channelId": "UC8-Th83bH_thdKZDJCrn88g",
    "title": "Jim Jefferies Let an Identity Thief Keep Using His Credit Card"
   }
  },
  {
   "id": {
    "videoId": "HZ-O9SxQKA4"
   },
   "snippet": {
    "publishedAt": "2019-09-13T10:00:05.000Z",
    "channelId": "UC8-Th83bH_thdKZDJCrn88g",
    "title": "Jim Jefferies Is a Fail to His Son and a Bad Immigrant to America"
   }
  },
  {
   "id": {
    "videoId": "8y0C4JPf3-s"
   },
   "snippet": {
    "publishedAt": "2019-09-13T09:30:01.000Z",
    "channelId": "UC8-Th83bH_thdKZDJCrn88g",
    "title": "Jennifer Garner's Daughter Affectionately Calls Her "Fun-Killer" Mom"
   }
  },
  {
   "id": {
    "videoId": "hEKKS93d3Co"
   },
   "snippet": {
    "publishedAt": "2019-09-13T09:00:08.000Z",
    "channelId": "UC8-Th83bH_thdKZDJCrn88g",
    "title": "Thank You Notes: Hustlers for Casting Lizzo, Fancy Bloody Marys"
   }
  },
  {
   "id": {
    "videoId": "5KxL7RkT4S0"
   },
   "snippet": {
    "publishedAt": "2019-09-12T09:00:00.000Z",
    "channelId": "UC8-Th83bH_thdKZDJCrn88g",
    "title": "Kim Kardashian West Sets the Record Straight About Moving to Wyoming"
   }
  },
  {
   "id": {
    "videoId": "fEATS2F46vg"
   },
   "snippet": {
    "publishedAt": "2019-09-12T09:00:09.000Z",
    "channelId": "UC8-Th83bH_thdKZDJCrn88g",
    "title": "Kim Kardashian West and Winnie Harlow Bonded Over Autoimmune Issues"
   }
  },
  {
   "id": {
    "videoId": "3GNjbAACqIY"
   },
   "snippet": {
    "publishedAt": "2019-09-12T03:51:27.000Z",
    "channelId": "UC8-Th83bH_thdKZDJCrn88g",
    "title": "Show Me Your Phone w/ Kim Kardashian West"
   }
  },
  {
   "id": {
    "videoId": "1htjuCla5Bw"
   },
   "snippet": {
    "publishedAt": "2019-09-11T10:30:01.000Z",
    "channelId": "UC8-Th83bH_thdKZDJCrn88g",
    "title": "Russell Westbrook Teaches Jimmy His Seated Pre-Game Dance Routine"
   }
  }
 ]
}

省略了我可以在频道的上传页面上看到的很多视频(按添加日期排序,最新):

API 响应中返回的第一个视频显示为频道页面上的第 12 个视频。此外,在 API 响应中的第一个视频和 API 响应中的第二个视频之间,屏幕上显示了 3 个视频。

【问题讨论】:

    标签: youtube-api youtube-data-api


    【解决方案1】:

    把我吓坏了大约十天。以为我的重命名脚本搞砸了。幸运的是(?)它在 API 端,并且有一个未解决的问题......

    https://support.google.com/youtube/thread/14611425?hl=en

    希望能减轻您的顾虑!

    【讨论】:

      猜你喜欢
      • 2016-07-13
      • 2015-04-30
      • 2014-11-16
      • 1970-01-01
      • 2022-01-21
      • 2013-07-18
      • 2014-06-29
      • 2013-09-11
      • 1970-01-01
      相关资源
      最近更新 更多