如何使用youtube api按位置获取公共视频? [英] How to get public videos by location using youtube api?

查看:51
本文介绍了如何使用youtube api按位置获取公共视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我是 Youtube api 的新手,正在寻找使用 Youtube api 按位置在 Youtube 中获取所有用户公开的 Youtube 视频.有一些现有的应用程序,如 Geofeedia、COEverywhere、TrackinU,可以按位置获取社交网站的公开帖子.有什么办法可以在 Youtube 中获取某个地区的公开视频吗?

Hello i am new to Youtube api and looking for getting all the users public Youtube videos in Youtube by location using Youtube api .There are some existing apps like Geofeedia,COEverywhere, TrackinU which can get public posts of social networking sites by location . Is there is any way to get public Videos of an area in Youtube ?

推荐答案

使用 YouTube 数据 API,使用带有位置参数的搜索list:

Using YouTube Data API, using Search list with location parameter:

位置参数,结合locationRadius参数,定义圆形地理区域并限制搜索在元数据中指定地理区域的视频位于该区域内的位置.参数值为字符串指定纬度/经度坐标,例如(37.42307,-122.08427).

The location parameter, in conjunction with the locationRadius parameter, defines a circular geographic area and also restricts a search to videos that specify, in their metadata, a geographic location that falls within that area. The parameter value is a string that specifies latitude/longitude coordinates e.g. (37.42307,-122.08427).

location 参数值标识位于中心的点区域.locationRadius 参数指定最大距离与视频关联的位置可以是从那个点开始视频仍将包含在搜索结果中.API 返回一个如果您的请求为 location 参数指定了一个值,则错误也没有为 locationRadius 参数指定值.

The location parameter value identifies the point at the center of the area. The locationRadius parameter specifies the maximum distance that the location associated with a video can be from that point for the video to still be included in the search results. The API returns an error if your request specifies a value for the location parameter but does not also specify a value for the locationRadius parameter.

这篇关于如何使用youtube api按位置获取公共视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆