fix !vreme for spaces in cities
This commit is contained in:
parent
690239bb86
commit
d52b4ac5e5
@ -51,7 +51,7 @@ def getDmzTasks(url):
|
||||
|
||||
def get_weather(city:str) -> str:
|
||||
url = f"https://wttr.in/{city}?format=3"
|
||||
if not city.isalpha():
|
||||
if not city.replace(" ","").isalpha():
|
||||
return "no such city"
|
||||
resp = requests.get(url)
|
||||
return resp.content.decode("utf-8").strip()
|
||||
|
Loading…
Reference in New Issue
Block a user