Update locationdata.py

This commit is contained in:
SpudGunMan
2024-07-20 09:21:29 -07:00
parent 0ddce395d9
commit 33af46178a
+1 -2
View File
@@ -44,14 +44,13 @@ def get_tide(lat=0, lon=0):
station_json = station_data.json()
else:
return ERROR_FETCHING_DATA
station_id = station_json['stationList'][0]['stationId']
except (requests.exceptions.RequestException, json.JSONDecodeError):
return ERROR_FETCHING_DATA
if station_id is None:
return "no station found"
station_id = station_json['stationList'][0]['stationId']
station_url = "https://tidesandcurrents.noaa.gov/noaatidepredictions.html?id=" + station_id
try: