|
@@ -23,8 +23,10 @@ def jwd_to_area(location):
|
|
|
}
|
|
|
response = requests.post(url=url, headers=headers, json=location, verify=False)
|
|
|
if response.status_code == 200:
|
|
|
- return response.json()['data'][0]['district']
|
|
|
-
|
|
|
+ try:
|
|
|
+ return response.json()['data'][0]['district']
|
|
|
+ except:
|
|
|
+ return None
|
|
|
def put_area(table : str,longitude='longitude',latitude='latitude'):
|
|
|
conn=None
|
|
|
cur = None
|