https://gdata.youtube.com/feeds/api/videos/<video_id>?v=2 的替代品 [英] Alternative for https://gdata.youtube.com/feeds/api/videos/<video_id>?v=2
问题描述
这些天我注意到我在我的项目中使用的 Youtube API 不再可用,例如
These days I noticed that Youtube API which I'm using on my project is no longer available, e.g.
https://gdata.youtube.com/feeds/api/视频/dLEk9yiXVQs?v=2
返回 HTTP 410 响应代码,这意味着请求的资源不再可用并且将不再可用.
returns HTTP 410 response code which means that requested resource is no longer available and will not be available again.
我应该改用什么?
推荐答案
如果我正确理解您的问题,那么您应该使用 https://www.googleapis.com/youtube/v3/videos?id=<video_id>&key=<YOUR_API_KEY>&part=snippet
从现在开始.
If I'm understanding your question correctly then you should be using https://www.googleapis.com/youtube/v3/videos?id=<video_id>&key=<YOUR_API_KEY>&part=snippet
from now on.
Google 自 2015 年 4 月 20 日起关闭旧 API.
查看最新的 v3 API入门.
Take a look at the newest v3 API getting started.
这篇关于https://gdata.youtube.com/feeds/api/videos/<video_id>?v=2 的替代品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!