[generic] Add Referer header for direct videojs download URLs (closes #2879, closes #20217, closes #29053)

pull/29064/head
Sergey M․ 2021-05-16 20:28:32 +07:00
parent 2202cef0e4
commit 552b139911
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D
1 changed files with 3 additions and 0 deletions

View File

@ -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)