diff --git a/biliup/__init__.py b/biliup/__init__.py index cc40c13..a9bc09d 100644 --- a/biliup/__init__.py +++ b/biliup/__init__.py @@ -2,7 +2,7 @@ import logging import platform import sys -__version__ = "0.4.90" +__version__ = "0.4.91" LOG_CONF = { 'version': 1, diff --git a/biliup/engine/download.py b/biliup/engine/download.py index 2b46ebf..6337d5d 100644 --- a/biliup/engine/download.py +++ b/biliup/engine/download.py @@ -221,13 +221,15 @@ class DownloadBase(ABC): streamlink_cmd = [ 'streamlink', '--stream-segment-threads', '3', - '--hls-playlist-reload-attempts', '1', - '--http-header', - ';'.join([f'{key}={value}' for key, value in self.fake_headers.items()]), + '--hls-playlist-reload-attempts', '1' + ] + for key, value in self.fake_headers.items(): + streamlink_cmd.extend(['--http-header', f'{key}={value}']) + streamlink_cmd.extend([ self.raw_stream_url, 'best', '-O' - ] + ]) streamlink_proc = subprocess.Popen(streamlink_cmd, stdout=subprocess.PIPE) input_uri = 'pipe:0' else: