comwrg / bilibiliupload

This project is not maintained anymore.
MIT License
140 stars 35 forks source link

是不是API登录用不了? #9

Closed deng47 closed 6 years ago

deng47 commented 7 years ago

貌似从昨天开始不能够用api登录了?有没有人遇到同样问题? 查看log发现报错,程序执行到if r.json()['status'] != 'OK':时出错,把r打印出来,发现是b站服务器返回<Response [503]> 试着在headers里加一个伪装浏览器信息再发起请求,但结果还是一样。


  File "./upload.py", line 198, in main
    b.login('隐去用户名','隐去密码')
  File "./upload.py", line 51, in login
    if r.json()['status'] != 'OK':
  File "/usr/lib/python3/dist-packages/requests/models.py", line 793, in json
    return json.loads(self.text, **kwargs)
  File "/usr/lib/python3.4/json/__init__.py", line 318, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.4/json/decoder.py", line 343, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.4/json/decoder.py", line 361, in raw_decode
    raise ValueError(errmsg("Expecting value", s, err.value)) from None
ValueError: Expecting value: line 1 column 1 (char 0)
comwrg commented 6 years ago

不好意思,之前都没看见。 今天试了下可以登录的