首页 > 解决方案 > 使用 Python 的 eBird API

问题描述

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

from ebird.api import list_regions

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

当我运行此代码时,它显示 HTTP 410 Gone Error

请帮帮我

标签: python

解决方案


这是执行此工作的示例 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)

推荐阅读