dependent on position

when fuzzed ..
This commit is contained in:
SpudGunMan
2024-06-26 13:55:26 -07:00
parent dc6fac9033
commit ad1d42c736
+3 -1
View File
@@ -84,10 +84,12 @@ def get_weather(lat=0, lon=0, unit=0):
if float(lat) == 0 and float(lon) == 0:
return NO_DATA_NOGPS
weather_url = "https://forecast.weather.gov/MapClick.php?FcstType=text&lat=" + str(lat) + "&lon=" + str(lon)
if unit == 1:
weather_url += "&unit=0"
weather_url += "&unit=1"
try:
weather_data = requests.get(weather_url, timeout=URL_TIMEOUT)
if not weather_data.ok: