mirror of
https://github.com/nathom/streamrip.git
synced 2025-06-06 01:31:19 -04:00
Fix m3u8 encoding error for soundcloud
This commit is contained in:
parent
7b3aab1823
commit
5c8e0b1530
2 changed files with 4 additions and 4 deletions
|
@ -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