youtube-api - YouTube 数据 API v3 搜索丢失的视频

标签 youtube-api youtube-data-api

我正在尝试使用 youtube.search.list API 方法访问 channel “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"
   }
  }
 ]
}

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

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

最佳答案

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

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

希望这能减轻您的顾虑!

关于youtube-api - YouTube 数据 API v3 搜索丢失的视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58034602/

相关文章:

javascript - 对象存在,但在 YouTube 响应中仍未定义?

api - YouTube 数据 API 视频插入/更新 - 设置 'Game title'

android - YouTube 上的视频上传 - Android

python - Youtube API 中的重定向 URI 是什么?

javascript - 在 Next.js 版本 13 中,如果根布局必须始终是服务器端组件,如何将 prop 传递给根布局中的组件?

youtube-api - 我们可以在没有 OAuth 的情况下使用 google youtube data api

youtube - YouTube Data API v3 webhook 是否可用?

javascript - 如何从 youtube api 获取 channel 列表?

javascript - 使用youtube API和node.js添加youtube评论

javascript - 获取 playlistItems 的 viewCount,组合 HTTP 请求 youtube v3 + JQuery