Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bilibili :ERROR: BiliBili returns error -5016 #14296

Closed
beifengle opened this issue Sep 22, 2017 · 3 comments
Closed

bilibili :ERROR: BiliBili returns error -5016 #14296

beifengle opened this issue Sep 22, 2017 · 3 comments
Labels
bug

Comments

@beifengle
Copy link

@beifengle beifengle commented Sep 22, 2017

D:\workspace\clip-spider>youtube-dl https://www.bilibili.com/video/av8954693
[BiliBili] 8954693: Downloading webpage
[BiliBili] 8954693: Downloading video info page
ERROR: BiliBili returns error -5016

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Sep 22, 2017

A quick-and-dirty fix:

diff --git a/youtube_dl/extractor/bilibili.py b/youtube_dl/extractor/bilibili.py
index 1e57310d6..1334bc94c 100644
--- a/youtube_dl/extractor/bilibili.py
+++ b/youtube_dl/extractor/bilibili.py
@@ -113,7 +113,7 @@ class BiliBiliIE(InfoExtractor):
                 self._report_error(js)
             cid = js['result']['cid']
 
-        payload = 'appkey=%s&cid=%s&otype=json&quality=2&type=mp4' % (self._APP_KEY, cid)
+        payload = 'appkey=%s&cid=%s&otype=json&quality=0&type=' % (self._APP_KEY, cid)
         sign = hashlib.md5((payload + self._BILIBILI_KEY).encode('utf-8')).hexdigest()
 
         video_info = self._download_json(
@yan12125 yan12125 added the bug label Sep 22, 2017
@jaykay12
Copy link
Contributor

@jaykay12 jaykay12 commented Sep 25, 2017

It did worked fine with me. @luhy118
youtube-dl https://www.bilibili.com/video/av8954693
[BiliBili] 8954693: Downloading webpage
[BiliBili] 8954693: Downloading video info page
[download] Destination: 权力灰色地带谁来管,神秘部门来帮你-8954693.mp4
[download] 100% of 29.74MiB in 01:24

@beifengle
Copy link
Author

@beifengle beifengle commented Sep 26, 2017

now it sure.

@beifengle beifengle closed this Sep 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.