diff options
author | Sergey M․ <dstftw@gmail.com> | 2018-06-29 01:25:05 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2018-06-29 01:25:05 +0700 |
commit | 5e8e2fa51f416e227367211ab937dfea17f89f57 (patch) | |
tree | 852e82654d472411c86ae0a83690b2129977305d /youtube_dl | |
parent | d4a24f4091a622b808ff621e78b5cfd0db3c8c11 (diff) |
[extractor/common] Use source URL as Referer for HTML5 entries (closes #16849)
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/common.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index 394f34372..f3fec160d 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -2437,6 +2437,8 @@ class InfoExtractor(object): media_info['subtitles'].setdefault(lang, []).append({ 'url': absolute_url(src), }) + for f in media_info['formats']: + f.setdefault('http_headers', {})['Referer'] = base_url if media_info['formats'] or media_info['subtitles']: entries.append(media_info) return entries |