Issue with expired token
huiyiqun opened this issue · comments
(venv)> $ ./venv/bin/douban.fm [±master ●]
♥ Get local token - Username: Huiyiqun
♥ Get channel [ OK ]
♥ Get volume [ OK ]
♥ Get theme [ OK ]
♥ Get keys [ OK ]
Traceback (most recent call last):
File "./venv/bin/douban.fm", line 9, in <module>
load_entry_point('douban.fm==0.4.11', 'console_scripts', 'douban.fm')()
File "build/bdist.linux-x86_64/egg/doubanfm/douban.py", line 87, in main
File "build/bdist.linux-x86_64/egg/doubanfm/douban.py", line 46, in __init__
File "build/bdist.linux-x86_64/egg/doubanfm/data.py", line 16, in __init__
File "build/bdist.linux-x86_64/egg/doubanfm/model.py", line 38, in __init__
File "build/bdist.linux-x86_64/egg/doubanfm/model.py", line 55, in _func
File "build/bdist.linux-x86_64/egg/doubanfm/model.py", line 77, in _get_first_song
File "build/bdist.linux-x86_64/egg/doubanfm/API/api.py", line 143, in get_first_song
File "build/bdist.linux-x86_64/egg/doubanfm/API/api.py", line 128, in requests_url
File "/home/huiyiqun/Source/douban.fm/venv/lib/python2.7/site-packages/requests-2.8.1-py2.7.egg/requests/models.py", line 805, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib64/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
是最新的版本吗 0.4.11
是最新版,从github装的和从pypi装的都有这个问题。
昨天晚上听着听着就报错了,我怀疑是被豆瓣发现然后被踢出来了。
恩, 试着把~/.douban_token 删一下, 有个可能是cookie过期了, 重新登录再看看,
是的 cookie过期了 是不是考虑捕捉这个异常 然而删掉自动~/.douban_token?
另外OT一下,有没有可能指定打开验证码的软件。
我现在打开验证码之后会有 link firefox shotwell 一起跳出来。。好像应该只跳出来一个。
OK, 我去看看有什么方法解决这两个问题