Hacky s/ /%20/ fixes tflsearch problem. @jesopo: Please look at URL encoding in Utils

This commit is contained in:
Evelyn 2016-09-27 02:27:09 +01:00
parent 0a468c19d4
commit f8f011f69e

View file

@ -150,7 +150,10 @@ class Module(object):
def search(self, event):
app_id = self.bot.config["tfl-api-id"]
app_key = self.bot.config["tfl-api-key"]
stop_name = event["args"]
#As awful as this is, it also makes it ~work~.
stop_name = event["args"].replace(" ", "%20")
stop_search = Utils.get_url(URL_STOP_SEARCH % stop_name, get_params={
"app_id": app_id, "app_key": app_key, "maxResults": "6", "faresOnly": "False"}, json=True)
if stop_search: