From d52b4ac5e5f3e2af84bbbeffce465ffb0d5b0fe9 Mon Sep 17 00:00:00 2001 From: fram3d Date: Mon, 4 Mar 2024 11:45:57 +0100 Subject: [PATCH] fix !vreme for spaces in cities --- scraper_functions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scraper_functions.py b/scraper_functions.py index 467dacc..49c94ca 100644 --- a/scraper_functions.py +++ b/scraper_functions.py @@ -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()