res = requests.get(url)
print(res.content)
with open("D://Python program//tiandi.png", 'wb') as file:
file.write(res.content)
其中url就是使用api的链接,但是不知道怎么保存下来,同样的使用高德地图的api就可以正常保存
...全文
64841打赏收藏
求助,想保存天地图api得到的地图图片
res = requests.get(url) print(res.content) with open("D://Python program//tiandi.png", 'wb') as file: file.write(res.content) 其中url就是使用api的链接,但是不知道怎么保存下来,同样的使用高德地图的api就可以正常保存