commit 5e8e2fa51f416e227367211ab937dfea17f89f57
parent d4a24f4091a622b808ff621e78b5cfd0db3c8c11
Author: Sergey M․ <dstftw@gmail.com>
Date:   Fri, 29 Jun 2018 01:25:05 +0700

[extractor/common] Use source URL as Referer for HTML5 entries (closes #16849)

Diffstat:
Myoutube_dl/extractor/common.py | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git 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