aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Beránek <zavorka@users.noreply.github.com>2020-11-30 19:14:29 +0100
committerGitHub <noreply@github.com>2020-12-01 01:14:29 +0700
commitbe19ae11fde9eb8cb28ff967ded15b457b5f80ea (patch)
treeba4613002a0e20301352553fa5a029b5a14e8322
parent59d63d8d4aa82c7b1472d5b6a0f9f4e9c2893212 (diff)
[cspan] Pass Referer header with format's video URL (#26032) (closes #25729)
-rw-r--r--youtube_dl/extractor/cspan.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/youtube_dl/extractor/cspan.py b/youtube_dl/extractor/cspan.py
index 67d6df4b0..3356cc280 100644
--- a/youtube_dl/extractor/cspan.py
+++ b/youtube_dl/extractor/cspan.py
@@ -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),