Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -42,7 +42,7 @@ def fetch_openweather_data(lat, lon, datetime_input):
|
|
| 42 |
|
| 43 |
def fetch_openweather_forecast(lat, lon):
|
| 44 |
"""Fetches 7-day weather forecast data from OpenWeather's One Call API."""
|
| 45 |
-
url = f"https://api.openweathermap.org/data/
|
| 46 |
try:
|
| 47 |
response = requests.get(url)
|
| 48 |
response.raise_for_status() # Raise HTTPError for bad responses
|
|
|
|
| 42 |
|
| 43 |
def fetch_openweather_forecast(lat, lon):
|
| 44 |
"""Fetches 7-day weather forecast data from OpenWeather's One Call API."""
|
| 45 |
+
url = f"https://api.openweathermap.org/data/3.0/onecall?lat={lat}&lon={lon}&exclude=current,minutely,hourly,alerts&appid={OPENWEATHER_API_KEY}&units=metric"
|
| 46 |
try:
|
| 47 |
response = requests.get(url)
|
| 48 |
response.raise_for_status() # Raise HTTPError for bad responses
|