diff options
| author | 2018-12-11 22:26:38 +0000 | |
|---|---|---|
| committer | 2018-12-11 22:26:38 +0000 | |
| commit | 793d234a0b924c0330e88f07f68b13559b42e4ac (patch) | |
| tree | 90ecd3746a77e17da915f90ec057cb16ead82c05 /modules/isgd.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/isgd.py')
| -rw-r--r-- | modules/isgd.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/isgd.py b/modules/isgd.py index f47a3df3..470c0dda 100644 --- a/modules/isgd.py +++ b/modules/isgd.py @@ -11,11 +11,11 @@ class Module(ModuleManager.BaseModule): if not re.match(REGEX_URL, url): url = "http://%s" % url - data = utils.http.get_url(ISGD_API_URL, get_params= + page = utils.http.request(ISGD_API_URL, get_params= {"format": "json", "url": url}, json=True) - if data and data["shorturl"]: - return data["shorturl"] + if page and page.data["shorturl"]: + return page.data["shorturl"] @utils.hook("received.command.shorten", min_args=1) def shorten(self, event): |
