mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-23 00:54:31 +01:00
[cspan] append 'Referer' header with the video URL
This commit is contained in:
parent
a115e07594
commit
c35e081e0d
@ -165,6 +165,8 @@ class CSpanIE(InfoExtractor):
|
|||||||
formats = self._extract_m3u8_formats(
|
formats = self._extract_m3u8_formats(
|
||||||
path, video_id, 'mp4', entry_protocol='m3u8_native',
|
path, video_id, 'mp4', entry_protocol='m3u8_native',
|
||||||
m3u8_id='hls') if determine_ext(path) == 'm3u8' else [{'url': path, }]
|
m3u8_id='hls') if determine_ext(path) == 'm3u8' else [{'url': path, }]
|
||||||
|
for f in formats:
|
||||||
|
f.setdefault('http_headers', {})['Referer'] = url
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
entries.append({
|
entries.append({
|
||||||
'id': '%s_%d' % (video_id, partnum + 1),
|
'id': '%s_%d' % (video_id, partnum + 1),
|
||||||
|
Loading…
Reference in New Issue
Block a user