From 228cd9bb906eb1dae476a05dbff0796a2d9f9be5 Mon Sep 17 00:00:00 2001 From: Yen Chi Hsuan Date: Sat, 6 May 2017 18:57:24 +0800 Subject: [PATCH] [bilibili] Fix video downloading (closes #13001) --- ChangeLog | 1 + youtube_dl/extractor/bilibili.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0908e2e93..7cceec10f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ version Extractors +* [bilibili] Fix video downloading (#13001) + [vice] Support vice articles (#12968) * [vice] Fix extraction for non en_us videos (#12967) * [gdcvault] Fix extraction for some videos (#12733) diff --git a/youtube_dl/extractor/bilibili.py b/youtube_dl/extractor/bilibili.py index 80dd8382e..1e3f25515 100644 --- a/youtube_dl/extractor/bilibili.py +++ b/youtube_dl/extractor/bilibili.py @@ -122,6 +122,11 @@ class BiliBiliIE(InfoExtractor): 'preference': -2 if 'hd.mp4' in backup_url else -3, }) + for a_format in formats: + a_format.setdefault('http_headers', {}).update({ + 'Referer': url, + }) + self._sort_formats(formats) entries.append({ -- 2.39.5