aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2021-05-16 20:28:32 +0700
committerSergey M․ <dstftw@gmail.com>2021-05-16 20:29:35 +0700
commit552b1399110360232bf1bf2ba5ed50cb8b30e818 (patch)
treeb1cbaba27c1ea91db57b45be2d41fb0a406100f5 /youtube_dl
parent2202cef0e4551293913e0be06b72b4cffccae0aa (diff)
[generic] Add Referer header for direct videojs download URLs (closes #2879, closes #20217, closes #29053)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/generic.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py
index f99d887ca..648a58c77 100644
--- a/youtube_dl/extractor/generic.py
+++ b/youtube_dl/extractor/generic.py
@@ -3400,6 +3400,9 @@ class GenericIE(InfoExtractor):
'url': src,
'ext': (mimetype2ext(src_type)
or ext if ext in KNOWN_EXTENSIONS else 'mp4'),
+ 'http_headers': {
+ 'Referer': full_response.geturl(),
+ },
})
if formats:
self._sort_formats(formats)