diff options
| author | 2018-12-11 22:26:38 +0000 | |
|---|---|---|
| committer | 2018-12-11 22:26:38 +0000 | |
| commit | 793d234a0b924c0330e88f07f68b13559b42e4ac (patch) | |
| tree | 90ecd3746a77e17da915f90ec057cb16ead82c05 /modules/wolframalpha.py | |
| parent | Actually use `action_desc` in github.py.issues, so that we can see what things (diff) | |
| signature | ||
'utils.http.get_url' -> 'utils.http.request', return a Response object from
utils.http.request
Diffstat (limited to 'modules/wolframalpha.py')
| -rw-r--r-- | modules/wolframalpha.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/wolframalpha.py b/modules/wolframalpha.py index 050b917d..cf9f7f1e 100644 --- a/modules/wolframalpha.py +++ b/modules/wolframalpha.py @@ -14,14 +14,14 @@ class Module(ModuleManager.BaseModule): :help: Evauate a given string on Wolfram|Alpha :usage: <query> """ - code, result = utils.http.get_url(URL_WA, + page = utils.http.requestl(URL_WA, get_params={"i": event["args"], "appid": self.bot.config["wolframalpha-api-key"], "reinterpret": "true", "units": "metric"}, code=True) - if not result == None: - if code == 200: - event["stdout"].write("%s: %s" % (event["args"], result)) + if page: + if page.code == 200: + event["stdout"].write("%s: %s" % (event["args"], page.data)) else: event["stdout"].write("No results") else: |
