mirror of
https://github.com/nathom/streamrip.git
synced 2025-06-04 08:59:47 -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,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
|
||||
|
|
|
@ -176,9 +176,9 @@ MEDIA_TYPES = {"track", "album", "artist", "label", "playlist", "video"}
|
|||
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"),
|
||||
}
|
||||
|
||||
|
|
|
@ -186,9 +186,7 @@ class DownloadPool:
|
|||
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()
|
||||
|
|
|
@ -439,7 +439,9 @@ class Track(Media):
|
|||
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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue