Youtube Data API V3 - No Video url

会有一股神秘感。 提交于 2019-12-04 23:34:20

You can have the video url like this :

You have the result :

     "kind": "youtube#searchResult",
"etag": "\"adasdasdasdasdas"",
"id": {
"kind": "youtube#video",
"videoId": "123123asdsad12"
},
...

Now you get the field "videoId": "123123asdsad12"

And you can acces to the video via the link:

https://www.youtube.com/watch?v=123123asdsad12

And that's it !

on your query, the "part" property actually indicates what information you want for the call to return, the "snippet" valie will return a more detailed information for each result, if you want the "videoID" data do the following, on the "part" property add "id" value, like this: ...?part=snippet,id&...

that will get you the data that contains the videoID information.

regards.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!