From 274c5b1b4821cb5d51883ce72199a1c01736f8bb Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Wed, 16 Oct 2019 12:35:00 +0200 Subject: [PATCH] Fixed bug when station containing "to" was treated as separator --- bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index 1f39039..0cb26ca 100644 --- a/bot.py +++ b/bot.py @@ -25,10 +25,10 @@ class Query: self.departure_count = int(args[-1]) last_index_string -= 1 request_tmp = ' '.join(args[0:last_index_string]).strip() - separator_index = request_tmp.find("to") + separator_index = request_tmp.find(" to ") if separator_index != -1: self.input = request_tmp[:separator_index - 1].strip() - self.destination = request_tmp[separator_index + 2:].strip() + self.destination = request_tmp[separator_index + 4:].strip() else: self.input = request_tmp if args[0].isdigit():