diff --git a/bot.py b/bot.py index e72fe66..468024f 100644 --- a/bot.py +++ b/bot.py @@ -43,7 +43,7 @@ def start(update): def search_station(query): request = requests.get("https://efa-api.asw.io/api/v1/station/?search=" + query) - if request.status_code != 200 and len(request.text) > 2: + if request.status_code != 200 or (request.status_code == 200 and len(request.text) <= 2): return -1 else: return request.json()[0]['stationId']