XXX呼叫后,Google Geocoding API停止工作

时间:2018-09-08 07:15:56

标签: python google-api geocoding

我有2万个销售点的清单,并在Excel上有地址,我正尝试将其通过Google Geocoding API以获得标准格式。我在使用openpyxl和geocoder的Python上。

我有一个付费的Google帐户,但我的问题是:在XXX(大约为1500)调用API之后,它不再响应了。最让我惊讶的是,我没有收到警告消息。

我不知道该如何处理。您认为它可能来自哪里?

感谢您的帮助。在下面找到我的代码:

def standard_addresses():
lenght_database = ws1.max_row
for i in range(1,lenght_database):
    if ws1.cell(row=i, column=8).value is not None:
        g = geocoder.google(ws1.cell(row=i, column=8).value, key="AIzaSyXXXBE7x_hTR_XXXXXXXXXXXXXX")
        sd_address = g.address
        ws1.cell(row=i, column=9).value = sd_address
        print("Done : {0}".format(i)+"/{0}".format(lenght_database))
        print(sd_address)

0 个答案:

没有答案