【发布时间】:2018-01-04 22:20:34
【问题描述】:
我刚刚开始探索 API。到目前为止,这是我的代码。对于 locu API,这是可行的,但对于 Zomato,他们使用我不知道如何使用的 curl 标头请求。有人可以指导或告诉我怎么做吗?
import json
import urllib2
Key = 'Zomato_key'
url = 'https://developers.zomato.com/api/v2.1/categories'
json_obj = urllib2.urlopen(url)
data = json.load(json_obj)
print data
【问题讨论】:
标签: json python-2.7 zomato-api