1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-26 02:14:32 +01:00

[cspan] append 'Referer' header with the video URL

This commit is contained in:
Roman Beranek 2020-07-17 18:58:13 +02:00
parent a115e07594
commit c35e081e0d
No known key found for this signature in database
GPG Key ID: F6A2DA578A259B18

View File

@ -165,6 +165,8 @@ class CSpanIE(InfoExtractor):
formats = self._extract_m3u8_formats(
path, video_id, 'mp4', entry_protocol='m3u8_native',
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)
entries.append({
'id': '%s_%d' % (video_id, partnum + 1),