Nitien commited on
Commit
529a947
·
verified ·
1 Parent(s): 1d45567

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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.status() == 200:
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: