diff options
author | Jesús <heckyel@hyperbola.info> | 2022-02-22 10:56:37 +0800 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2022-02-22 10:56:37 +0800 |
commit | 21cc56c6e71361ccf17cebb6b131113501815ae6 (patch) | |
tree | d7d490b56632f3f534fb80b610268c16d89dda7f /yt_dlp/extractor/bilibili.py | |
parent | c7a54bcfbd27dde89c6267b42da7de8ea5625be1 (diff) | |
parent | 4d4f9a029f8aebd06bcd98ca61e7629de47e0018 (diff) | |
download | hypervideo-pre-21cc56c6e71361ccf17cebb6b131113501815ae6.tar.lz hypervideo-pre-21cc56c6e71361ccf17cebb6b131113501815ae6.tar.xz hypervideo-pre-21cc56c6e71361ccf17cebb6b131113501815ae6.zip |
updated from upstream | 22/02/2022 at 10:56
Diffstat (limited to 'yt_dlp/extractor/bilibili.py')
-rw-r--r-- | yt_dlp/extractor/bilibili.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/yt_dlp/extractor/bilibili.py b/yt_dlp/extractor/bilibili.py index a775aa97f..1bbf7ca1c 100644 --- a/yt_dlp/extractor/bilibili.py +++ b/yt_dlp/extractor/bilibili.py @@ -225,10 +225,6 @@ class BiliBiliIE(InfoExtractor): 'quality': -2 if 'hd.mp4' in backup_url else -3, }) - for a_format in formats: - a_format.setdefault('http_headers', {}).update({ - 'Referer': url, - }) for audio in audios: formats.append({ 'url': audio.get('baseUrl') or audio.get('base_url') or audio.get('url'), @@ -252,6 +248,9 @@ class BiliBiliIE(InfoExtractor): 'id': video_id, 'duration': float_or_none(durl.get('length'), 1000), 'formats': formats, + 'http_headers': { + 'Referer': url, + }, }) break |