# 区域adcode查询--高德api
url_api= "https://restapi.amap.com/v3/config/district?"
keywords= get_location()
key= "your api key"
subdistrict= "0"
extensions= "base"
url_api+= "key="+key+ "&keywords="+keywords+ "&subdistrict="+subdistrict+"&extensions="+ extensions
res= requests.get(url_api)
res= json.loads(res.text)
adcode= res["districts"][0]["adcode"]
print(res["districts"][0]["adcode"])
API--区域adcode查询(高德api)
猜你喜欢
转载自blog.csdn.net/weixin_41879093/article/details/104208031
今日推荐
周排行