我正在jupyter中使用google_streetview api加载地址图片,但无法查看imag

2024-04-28 23:45:20 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在学习如何使用google_streetview api下载我地址的街道图像,但我无法做到。这是我的代码


geolocator= Nominatim(user_agent="my-application")
location= geolocator.geocode("--- Lubbock texas ")
longitude= location.longitude
latitude = location.latitude
print (longitude, latitude)
parameters= [{'size':'600x300',
             'location':'33.592231515625, -101.88548203125',
              'heading': '151.78',
              'pitch': '-0.76',
             'key':'---' }]
google_streetview.api.results(parameters)
results.preview()


The meta data json file downloaded, it shows gsv_0.jpeg But i cannot view or extract it  
Note: have removed my pano id!
json meta data file: 
[{"copyright": "\u00a9 Google", "date": "2018-10", "location": {"lat": 33 --, "lng": -101---}, "pano_id": "---", "status": "OK", "_file": "gsv_0.jpg"}]

Tags: apijsondatamygoogleitlocationresults