mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-08-14 08:28:29 +00:00
Set http_headers
This commit is contained in:
parent
f0b7ec707a
commit
f1be5d6967
@ -128,9 +128,6 @@ def _real_extract(self, url):
|
||||
formats.extend(fmts)
|
||||
self._merge_subtitles(subs, target=subtitles)
|
||||
|
||||
for f in formats:
|
||||
f['http_headers'] = headers
|
||||
|
||||
return {
|
||||
'id': f'{urllib.parse.urlparse(api_base).hostname}_{video_id}',
|
||||
**traverse_obj(traverse_obj(video_info, ('blocks', 0)), {
|
||||
@ -147,6 +144,7 @@ def _real_extract(self, url):
|
||||
}),
|
||||
'formats': formats,
|
||||
'subtitles': subtitles,
|
||||
'http_headers': headers,
|
||||
}
|
||||
|
||||
|
||||
@ -228,9 +226,6 @@ def _real_extract(self, url):
|
||||
formats.extend(fmts)
|
||||
self._merge_subtitles(subs, target=subtitles)
|
||||
|
||||
for f in formats:
|
||||
f['http_headers'] = headers
|
||||
|
||||
return {
|
||||
'id': f'{urllib.parse.urlparse(api_base).hostname}_{video_id}',
|
||||
**traverse_obj(channel, {
|
||||
@ -239,5 +234,6 @@ def _real_extract(self, url):
|
||||
}),
|
||||
'formats': formats,
|
||||
'subtitles': subtitles,
|
||||
'http_headers': headers,
|
||||
'is_live': True,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user