def get_GD(location): url='https://restapi.amap.com/v3/assistant/coordinate/convert?' key='208ce530fdd2dc162c8831657fff3232' link='{}locations={}&coordsys={}&key={}'.format(url,location,"gps",key) print(link) response=requests.get(link) if response.status_code == 200: print(str(response.json()['locations']).split(',')) response.close() return str(response.json()['locations']).split(',') else: print(link)
标签:key,locations,高德,api,link,坐标系,print,response From: https://www.cnblogs.com/cocotun/p/17591744.html