Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -31,8 +31,8 @@ def get_city_weather(city: str)-> str: #it's import to specify the return type
|
|
| 31 |
url_https = f"https://wttr.in/{city}?format=3"
|
| 32 |
try:
|
| 33 |
resp=requests.get(url_https)
|
| 34 |
-
if resp.
|
| 35 |
-
return resp
|
| 36 |
else:
|
| 37 |
return "No Data Found"
|
| 38 |
except Exception as e:
|
|
|
|
| 31 |
url_https = f"https://wttr.in/{city}?format=3"
|
| 32 |
try:
|
| 33 |
resp=requests.get(url_https)
|
| 34 |
+
if resp.status_code == 200:
|
| 35 |
+
return resp.text.strip()
|
| 36 |
else:
|
| 37 |
return "No Data Found"
|
| 38 |
except Exception as e:
|