From 12f2db9c46d87877947d580176df00734392d718 Mon Sep 17 00:00:00 2001 From: Nathan Thomas Date: Sat, 5 Feb 2022 22:27:08 -0800 Subject: [PATCH 1/4] Fix m3u8 encoding error for soundcloud --- streamrip/media.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/streamrip/media.py b/streamrip/media.py index 7de01b08..e0d48885 100644 --- a/streamrip/media.py +++ b/streamrip/media.py @@ -439,7 +439,9 @@ def _soundcloud_download(self, dl_info: dict): import m3u8 import requests - parsed_m3u = m3u8.loads(requests.get(dl_info["url"]).text) + parsed_m3u = m3u8.loads( + requests.get(dl_info["url"]).content.decode("utf-8") + ) self.path += ".mp3" with DownloadPool(segment.uri for segment in parsed_m3u.segments) as pool: From 5c8e0b15301b72caf36f5058d612bd74a14dcea6 Mon Sep 17 00:00:00 2001 From: Nathan Thomas Date: Sat, 5 Feb 2022 22:33:00 -0800 Subject: [PATCH 2/4] Fix m3u8 encoding error for soundcloud --- streamrip/downloadtools.py | 4 +--- streamrip/media.py | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/streamrip/downloadtools.py b/streamrip/downloadtools.py index b059c535..f2418b4c 100644 --- a/streamrip/downloadtools.py +++ b/streamrip/downloadtools.py @@ -186,9 +186,7 @@ async def _download_url(self, session, url): async with session.get(url) as response, aiofiles.open(filename, "wb") as f: # without aiofiles 3.6632679780000004s # with aiofiles 2.504482839s - content = await response.content.read() - print(content) - await f.write(content) + await f.write(await response.content.read()) if self.callback: self.callback() diff --git a/streamrip/media.py b/streamrip/media.py index 7de01b08..e0d48885 100644 --- a/streamrip/media.py +++ b/streamrip/media.py @@ -439,7 +439,9 @@ def _soundcloud_download(self, dl_info: dict): import m3u8 import requests - parsed_m3u = m3u8.loads(requests.get(dl_info["url"]).text) + parsed_m3u = m3u8.loads( + requests.get(dl_info["url"]).content.decode("utf-8") + ) self.path += ".mp3" with DownloadPool(segment.uri for segment in parsed_m3u.segments) as pool: From ad704b116d0430bcf9e1e2559ccf2631551e97d6 Mon Sep 17 00:00:00 2001 From: Jayden Date: Mon, 7 Feb 2022 08:07:17 -0500 Subject: [PATCH 3/4] fix(tidal): update credentials --- streamrip/constants.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/streamrip/constants.py b/streamrip/constants.py index 252903e8..5cc13185 100644 --- a/streamrip/constants.py +++ b/streamrip/constants.py @@ -176,9 +176,9 @@ COVER_SIZES = ("thumbnail", "small", "large", "original") TIDAL_CLIENT_INFO = { - "id": base64.b64decode("OFNFWldhNEoxTlZDNVU1WQ==").decode("iso-8859-1"), + "id": base64.b64decode("elU0WEhWVmtjMnREUG80dA==").decode("iso-8859-1"), "secret": base64.b64decode( - "b3dVWURreGRkeis5RnB2R1gyNERseEVDTnRGRU1CeGlwVTBsQmZyYnE2MD0=" + "VkpLaERGcUpQcXZzUFZOQlY2dWtYVEptd2x2YnR0UDd3bE1scmM3MnNlND0=" ).decode("iso-8859-1"), } From c781e002ae801a625adf23aebdc3c3b3835b67f2 Mon Sep 17 00:00:00 2001 From: Nathan Thomas Date: Mon, 14 Feb 2022 19:19:30 -0800 Subject: [PATCH 4/4] Bump to 1.9.4 --- pyproject.toml | 2 +- streamrip/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 693a7b88..a3fd028d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "streamrip" -version = "1.9.3" +version = "1.9.4" description = "A fast, all-in-one music ripper for Qobuz, Deezer, Tidal, and SoundCloud" authors = ["nathom "] license = "GPL-3.0-only" diff --git a/streamrip/__init__.py b/streamrip/__init__.py index d723a9ac..832f100d 100644 --- a/streamrip/__init__.py +++ b/streamrip/__init__.py @@ -1,5 +1,5 @@ """streamrip: the all in one music downloader.""" -__version__ = "1.9.3" +__version__ = "1.9.4" from . import clients, constants, converter, downloadtools, media