aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2017-05-06 18:57:24 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2017-05-06 18:58:38 +0800
commit228cd9bb906eb1dae476a05dbff0796a2d9f9be5 (patch)
tree4cd3854751931af409dc214e0d114f40dd011d7f /youtube_dl
parent566fbbaefd459df46ebce512cd916248e069e4f2 (diff)
[bilibili] Fix video downloading (closes #13001)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/bilibili.py5
1 files changed, 5 insertions, 0 deletions
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({