我使用GoogleMap静态地图api获取卫星图像,并希望将其存储在本地硬盘中,但python得到了urllib.error.URLError: <urlopen error [WinError 10060]
这是我的代码,非常简单,谢谢
import urllib
import urllib.request as ur
# picture back from Google Static Map Api
img_src = 'http://maps.googleapis.com/maps/api/staticmap?scale=2¢er=31.403874,115.998672&zoom=12&size=400x400&maptype=satellite&key=############'
ur.urlretrieve(img_src, 'D:/G.png')
我认为您不想公开共享API密钥。这个很好用。 错误代码10060表示它无法连接到源。检查你的网络
相关问题 更多 >
编程相关推荐