mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-22 02:01:50 +00:00
[extractor/common] Use source URL as Referer for HTML5 entries (closes #16849)
This commit is contained in:
parent
d4a24f4091
commit
5e8e2fa51f
1 changed files with 2 additions and 0 deletions
|
@ -2437,6 +2437,8 @@ class InfoExtractor(object):
|
||||||
media_info['subtitles'].setdefault(lang, []).append({
|
media_info['subtitles'].setdefault(lang, []).append({
|
||||||
'url': absolute_url(src),
|
'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']:
|
if media_info['formats'] or media_info['subtitles']:
|
||||||
entries.append(media_info)
|
entries.append(media_info)
|
||||||
return entries
|
return entries
|
||||||
|
|
Loading…
Reference in a new issue