From: Sergey M․ Date: Thu, 28 Jun 2018 18:25:05 +0000 (+0700) Subject: [extractor/common] Use source URL as Referer for HTML5 entries (closes #16849) X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=5e8e2fa51f416e227367211ab937dfea17f89f57;p=youtube-dl.git [extractor/common] Use source URL as Referer for HTML5 entries (closes #16849) --- 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