eBird API与Python

问题描述 投票:0回答:1

请帮助我开始使用python的ebird.api库。

from ebird.api import list_regions

states = list_regions('subnational1', 'US')

当我运行这段代码时,它显示HTTP 410 Gone错误。

请你帮帮我

python
1个回答
0
投票

这里是一个做这项工作的R代码示例。使用这个作为一个例子,并将其转换为python。

h <- new_handle()
handle_setheaders(h, "X-eBirdApiToken" = "paste your token here")  
req <-curl_fetch_memory(paste0("https://ebird.org/ws2.0/product/checklist/view/", Checklist),h)
© www.soinside.com 2019 - 2024. All rights reserved.