mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-22 10:11:52 +00:00
[generic] Add Referer header for direct videojs download URLs (closes #2879, closes #20217, closes #29053)
This commit is contained in:
parent
2202cef0e4
commit
552b139911
1 changed files with 3 additions and 0 deletions
|
@ -3400,6 +3400,9 @@ class GenericIE(InfoExtractor):
|
||||||
'url': src,
|
'url': src,
|
||||||
'ext': (mimetype2ext(src_type)
|
'ext': (mimetype2ext(src_type)
|
||||||
or ext if ext in KNOWN_EXTENSIONS else 'mp4'),
|
or ext if ext in KNOWN_EXTENSIONS else 'mp4'),
|
||||||
|
'http_headers': {
|
||||||
|
'Referer': full_response.geturl(),
|
||||||
|
},
|
||||||
})
|
})
|
||||||
if formats:
|
if formats:
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
Loading…
Reference in a new issue