Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ import json
|
|
| 5 |
# Function to fetch weather data from Visual Crossing API
|
| 6 |
def get_weather(location):
|
| 7 |
api_key = "ZM8XWVVTTFKULAAWTHK2S8UTP" # Your Visual Crossing API key
|
| 8 |
-
url = f"https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/{location}?unitGroup=us&key={api_key}&contentType=json"
|
| 9 |
|
| 10 |
try:
|
| 11 |
ResultBytes = urllib.request.urlopen(url)
|
|
|
|
| 5 |
# Function to fetch weather data from Visual Crossing API
|
| 6 |
def get_weather(location):
|
| 7 |
api_key = "ZM8XWVVTTFKULAAWTHK2S8UTP" # Your Visual Crossing API key
|
| 8 |
+
url = f"https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/{location}?unitGroup=us&include=hours&key={api_key}&contentType=json"
|
| 9 |
|
| 10 |
try:
|
| 11 |
ResultBytes = urllib.request.urlopen(url)
|