diff options
| author | 2016-09-27 02:27:09 +0100 | |
|---|---|---|
| committer | 2016-09-27 02:27:09 +0100 | |
| commit | f8f011f69e0db9eab71b78cfffe1b164c0ce7ede (patch) | |
| tree | cc42bb8dbc37258a886a4238e81bc9fb3d796379 /modules/tfl.py | |
| parent | remove comments (diff) | |
| signature | ||
Hacky s/ /%20/ fixes tflsearch problem. @jesopo: Please look at URL encoding in Utils
Diffstat (limited to 'modules/tfl.py')
| -rw-r--r-- | modules/tfl.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/tfl.py b/modules/tfl.py index 2be43e55..0a7df105 100644 --- a/modules/tfl.py +++ b/modules/tfl.py @@ -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: |
