我建议使用很棒的请求库:
import requestsurl = 'http://maps.googleapis.com/maps/api/directions/json'params = dict( origin='Chicago,IL', destination='Los+Angeles,CA', waypoints='Joplin,MO|Oklahoma+City,OK', sensor='false')resp = requests.get(url=url, params=params)data = resp.json() # Check the JSON Response Content documentation below
JSON响应内容:https :
//requests.readthedocs.io/en/master/user/quickstart/#json-response-
content
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)