简体   繁体   English

使用 python 下载 iNaturalist 图像

[英]Downloading iNaturalist images using python

I am trying to download images form iNaturalist site: https://www.inaturalist.org/home我正在尝试从 iNaturalist 站点下载图像: https://www.inaturalist.org/home

For this I am using the following site: https://www.inaturalist.org/observations/export为此,我使用以下网站: https://www.inaturalist.org/observations/export

But I would like to download it directly using python script:但我想直接使用 python 脚本下载它:

import json
from urllib.request import urlopen
import urllib.parse

url = 'https://www.inaturalist.org/observations.json?has%5B%5D=photos&quality_grade=research&identifications=most_agree&captive=false&taxon_id=85553'
response = urlopen(url)
data = json.loads(response.read())
df = pd.DataFrame(data)

Unfortunately its not working as it bring much less images than the expected number.不幸的是它不起作用,因为它带来的图像比预期的数量少得多。 I think I must be doing something wrong.我想我一定做错了什么。 The url used is the one created through the second site I gave adding at the beginning:' https://www.inaturalist.org/observations.json ?'.使用的 url 是通过我在开头添加的第二个站点创建的:' https://www.inaturalist.org/observations.json ?'。 Any help would be greatly appreciated.任何帮助将不胜感激。 Thank you!谢谢!

It is limited to 100 observations.它仅限于 100 个观察值。 You can split your query into multiple queries.您可以将查询拆分为多个查询。 However, iNaturalist requests that you not export large numbers of queries.但是,iNaturalist 要求您不要导出大量查询。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM