projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d4a24f4
)
[extractor/common] Use source URL as Referer for HTML5 entries (closes #16849)
author
Sergey M․
<dstftw@gmail.com>
Thu, 28 Jun 2018 18:25:05 +0000
(
01:25
+0700)
committer
Sergey M․
<dstftw@gmail.com>
Thu, 28 Jun 2018 18:25:05 +0000
(
01:25
+0700)
youtube_dl/extractor/common.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/common.py
b/youtube_dl/extractor/common.py
index 394f34372ea414bfe9d6e44b16a465d54c455b0d..f3fec160dcd0795840725227edcbfbfe3f3673c3 100644
(file)
--- 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