YouTube Data API v3搜索丢失的视频

时间:2019-09-20 20:11:41

标签: youtube-api youtube-data-api

我正在尝试使用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"
   }
  }
 ]
}

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

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

1 个答案:

答案 0 :(得分:2)

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

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

希望减轻您的担心!

相关问题