diff options
| author | 2018-12-11 22:26:38 +0000 | |
|---|---|---|
| committer | 2018-12-11 22:26:38 +0000 | |
| commit | 793d234a0b924c0330e88f07f68b13559b42e4ac (patch) | |
| tree | 90ecd3746a77e17da915f90ec057cb16ead82c05 /modules/spotify.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/spotify.py')
| -rw-r--r-- | modules/spotify.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/spotify.py b/modules/spotify.py index 0bd92de6..2f13d432 100644 --- a/modules/spotify.py +++ b/modules/spotify.py @@ -10,12 +10,12 @@ class Module(ModuleManager.BaseModule): :help: Search for a track on spotify :usage: <term> """ - page = utils.http.get_url(URL_SPOTIFY, get_params= + page = utils.http.request(URL_SPOTIFY, get_params= {"type": "track", "limit": 1, "q": event["args"]}, json=True) if page: - if len(page["tracks"]["items"]): - item = page["tracks"]["items"][0] + if len(page.data["tracks"]["items"]): + item = page.data["tracks"]["items"][0] title = item["name"] artist_name = item["artists"][0]["name"] url = item["external_urls"]["spotify"] |
