使用 Flickr API 按位置或语言搜索照片
一些流行词,如“食物”,在世界各地都被用作外来词。
我正在尝试使用 flickr.photos.search
获取来自一种特定语言或地区的照片。 我在 http://www.flickr 中找不到此设置.com/services/api/flickr.photos.search.html
我尝试了这两种方法,但都不起作用:
我在Google搜索了一下,只发现YQL可以按位置搜索。 (我将以另一种方式使用 YQL,通过 api 进行的过多调用将受到限制。)
我还发现在 flickr.photos.search
中可以设置 lat
、 lon
和 radius
,但范围是一个圆,因此这不会将搜索限制在特定国家/地区。
这些对我来说都不是好的选择。有人可以帮忙吗?
Some popular words, like "food," are used all over the world as loan words.
I am trying to use flickr.photos.search
to get photos from one specific language or region.
I didn't find a setting for this in http://www.flickr.com/services/api/flickr.photos.search.html
I tried these two ways, but neither worked:
I searched in Google and only found that YQL can search by location. (I will use YQL in another way, too many calls will over the api will be limited.)
I also found that in flickr.photos.search
one can set a lat
, lon
, and radius
, but the range is a circle, so this will not limit a search to a specific country.
None of these are good choices for me. Can anyone help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
实际上有一些有趣的方法可以做到这一点。
我的方法是首先使用地点 API 找到您要查找的地点:
flickr.places.find
: http://www.flickr.com/services/api/flickr.places.find.html 这将返回 WOE 列表(在哪里Earth) 给定查询的 id。您的查询可以是从街道地址到国家/地区的任何内容。获得 WOE ID 后,您就可以提交
flickr.photos.search
查询,其中包含可选的 place_id 或 WOE ID。另一种有趣的方法是在获得 WOE id 后调用
flickr.places.tagsForPlace
方法,然后通过这些标签搜索照片。这可能会产生更有趣的结果,并且还会淘汰未指定地点但指定了标签的用户。There are actually a few interesting ways to do this.
The way I would do it is to first find the place you are looking for by using the place API:
flickr.places.find
: http://www.flickr.com/services/api/flickr.places.find.html This will return a list of WOE (Where on Earth) ids for a given query. Your query can be anything from a street address to a country.Once you have the WOE id, you could then submit a
flickr.photos.search
query including the optional place_id or WOE id.Another fun way to do this would be to call the
flickr.places.tagsForPlace
method once you have a WOE id, and then search for your photos by these tags. This might produce more interesting results and also weed out the users who didnt specify a place, but did specify tags.