Python阳光开放api

时间:2016-05-02 02:51:01

标签: python api

import requests

def call():
payload = {'apikey':'myapikey', 'zip':'74120'}
bas_url = 'http://openstates.org/api/v1//legislators'
r = requests.get(bas_url, params = payload)
grab = r.json() 
return grab

所以我想打电话给sunshinefoundation.org api openstates/legislator/locate mightlocate?

但是我返回了大量的错误,如果有人能从头顶看到这个错误我不想用整个错误信息堵塞线程,但如果有人真的需要它,请注释它。

0 个答案:

没有答案