]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[bilibili] Fix video downloading (closes #13001)
authorYen Chi Hsuan <yan12125@gmail.com>
Sat, 6 May 2017 10:57:24 +0000 (18:57 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Sat, 6 May 2017 10:58:38 +0000 (18:58 +0800)
ChangeLog
youtube_dl/extractor/bilibili.py

index 0908e2e93cac9d50ef07349cd0a3006a08f476e4..7cceec10f7f3c253791cc19fb5ebeb096554a259 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 version <unreleased>
 
 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)
index 80dd8382e4e8758274e3a7ba2418479ee3d2fbbc..1e3f25515d3596f7b196a16ab867b7b5e8c891ab 100644 (file)
@@ -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({