【发布时间】:2020-02-19 01:04:53
【问题描述】:
当我运行这段代码时:
url = f"https://traffic.ls.hereapi.com//traffic/6.3/incidents.json?proximity=37.3541,-121.9552?apiKey={api_key}"
Scrape Here.com for any traffic incidents in the last 24 hours for the set proximity
res = requests.get(url)
date_requested = time.strftime('%Y-%m-%d')
time_requested = time.strftime('%H:%M')
date_requested; time_requested #print date & time of request
我得到这个错误:
<html><body><p>{"error":"Unauthorized","error_description":"ApiKey is missing."}</p></body></html>
谁能告诉我为什么?我知道 API 密钥是有效的,因为我生成了一个新密钥并将其剪切并粘贴到上面的代码中,所以它必须是我查询的结构,不是吗?
我非常感谢任何和所有的帮助。
【问题讨论】:
标签: here-api