ly0 / baidupcsapi

百度网盘api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

莫名其妙的的登陆异常情况.

x5w46fxdx opened this issue · comments

使用save_share_list的时候.
if 'errno' in foo and foo['errno'] == -6 :
到这句就报异常:raise LoginFailed('User unsigned in.')
---实际返回的json信息:
{u'errno': 0, u'err_msg': u'', u'request_id': 3618439044591988158}
这json不应该有异常情况!
save_share_list使用了_request .返回结果是html 造成json异常.
wrapper 中加入了这个就好了!
if ret.content[:1] != '{' :
return ret

是服务器返回的不是JSON格式的字符串嘛?