diff --git a/streamrip/clients.py b/streamrip/clients.py index 8c9a982..4eab037 100644 --- a/streamrip/clients.py +++ b/streamrip/clients.py @@ -1131,8 +1131,8 @@ class SoundCloudClient(Client): raise Exception if track["downloadable"] and track["has_downloads_left"]: - r = self._get(f"tracks/{track['id']}/download", resp_obj=True) - return {"url": r.json()["redirectUri"], "type": "original"} + r = self._get(f"tracks/{track['id']}/download")[0] + return {"url": r["redirectUri"], "type": "original"} else: url = None @@ -1166,7 +1166,7 @@ class SoundCloudClient(Client): resp, _ = self._get(f"search/{media_type}s", params=params) return resp - def _get(self, path, params=None, no_base=False, resp_obj=False): + def _get(self, path, params=None, no_base=False) -> Tuple[dict, int]: """Send a request to the SoundCloud API. :param path: diff --git a/streamrip/spoofbuz.py b/streamrip/spoofbuz.py index 5dbb4e8..f986795 100644 --- a/streamrip/spoofbuz.py +++ b/streamrip/spoofbuz.py @@ -36,6 +36,7 @@ class Spoofer: r'', login_page, ) + assert bundle_url_match is not None bundle_url = bundle_url_match.group(1) bundle_req = requests.get("https://play.qobuz.com" + bundle_url) self.bundle = bundle_req.text