mirror of
https://github.com/nathom/streamrip.git
synced 2025-06-06 01:31:19 -04:00
Merge branch 'nathom:main' into main
This commit is contained in:
commit
b8e6349e58
5 changed files with 8 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "streamrip"
|
name = "streamrip"
|
||||||
version = "1.9.3"
|
version = "1.9.4"
|
||||||
description = "A fast, all-in-one music ripper for Qobuz, Deezer, Tidal, and SoundCloud"
|
description = "A fast, all-in-one music ripper for Qobuz, Deezer, Tidal, and SoundCloud"
|
||||||
authors = ["nathom <nathanthomas707@gmail.com>"]
|
authors = ["nathom <nathanthomas707@gmail.com>"]
|
||||||
license = "GPL-3.0-only"
|
license = "GPL-3.0-only"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
"""streamrip: the all in one music downloader."""
|
"""streamrip: the all in one music downloader."""
|
||||||
|
|
||||||
__version__ = "1.9.3"
|
__version__ = "1.9.4"
|
||||||
|
|
||||||
from . import clients, constants, converter, downloadtools, media
|
from . import clients, constants, converter, downloadtools, media
|
||||||
|
|
|
@ -176,9 +176,9 @@ MEDIA_TYPES = {"track", "album", "artist", "label", "playlist", "video"}
|
||||||
COVER_SIZES = ("thumbnail", "small", "large", "original")
|
COVER_SIZES = ("thumbnail", "small", "large", "original")
|
||||||
|
|
||||||
TIDAL_CLIENT_INFO = {
|
TIDAL_CLIENT_INFO = {
|
||||||
"id": base64.b64decode("OFNFWldhNEoxTlZDNVU1WQ==").decode("iso-8859-1"),
|
"id": base64.b64decode("elU0WEhWVmtjMnREUG80dA==").decode("iso-8859-1"),
|
||||||
"secret": base64.b64decode(
|
"secret": base64.b64decode(
|
||||||
"b3dVWURreGRkeis5RnB2R1gyNERseEVDTnRGRU1CeGlwVTBsQmZyYnE2MD0="
|
"VkpLaERGcUpQcXZzUFZOQlY2dWtYVEptd2x2YnR0UDd3bE1scmM3MnNlND0="
|
||||||
).decode("iso-8859-1"),
|
).decode("iso-8859-1"),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -186,9 +186,7 @@ class DownloadPool:
|
||||||
async with session.get(url) as response, aiofiles.open(filename, "wb") as f:
|
async with session.get(url) as response, aiofiles.open(filename, "wb") as f:
|
||||||
# without aiofiles 3.6632679780000004s
|
# without aiofiles 3.6632679780000004s
|
||||||
# with aiofiles 2.504482839s
|
# with aiofiles 2.504482839s
|
||||||
content = await response.content.read()
|
await f.write(await response.content.read())
|
||||||
print(content)
|
|
||||||
await f.write(content)
|
|
||||||
|
|
||||||
if self.callback:
|
if self.callback:
|
||||||
self.callback()
|
self.callback()
|
||||||
|
|
|
@ -439,7 +439,9 @@ class Track(Media):
|
||||||
import m3u8
|
import m3u8
|
||||||
import requests
|
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"
|
self.path += ".mp3"
|
||||||
|
|
||||||
with DownloadPool(segment.uri for segment in parsed_m3u.segments) as pool:
|
with DownloadPool(segment.uri for segment in parsed_m3u.segments) as pool:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue