[generic] Add Referer header for direct videojs download URLs (closes #2879, closes...
authorSergey M․ <dstftw@gmail.com>
Sun, 16 May 2021 13:28:32 +0000 (20:28 +0700)
committerSergey M․ <dstftw@gmail.com>
Sun, 16 May 2021 13:29:35 +0000 (20:29 +0700)
youtube_dl/extractor/generic.py

index f99d887cafe8c542804595372efcca9712aa0624..648a58c77b43bf89de330c07cb0d03d3f108a3d9 100644 (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)