fix: 修复streamlink下载器header参数 (#1218)
* fix: 修复streamlink下载器header参数 * Update __init__.py --------- Co-authored-by: ForgQi <34411314+ForgQi@users.noreply.github.com>
This commit is contained in:
1 parent
b17bc6eaf3
commit
bb2e54f7fc
2 files changed
+7
-5
No files matched your search
+1
-1
@@ -2,7 +2,7 @@ import logging
|
||||
import platform
|
||||
import sys
|
||||
|
||||
__version__ = "0.4.90"
|
||||
__version__ = "0.4.91"
|
||||
|
||||
LOG_CONF = {
|
||||
'version': 1,
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user