kikyous / xfdown

QQ旋风离线下载程序
170 stars 54 forks source link

失效了 #8

Closed djhui closed 11 years ago

djhui commented 11 years ago

从今天开始,这个脚本不工作了,错误如下,不知道是腾讯改过东西了还是临时现象 Traceback (most recent call last): File "/usr/sbin/xfdown", line 425, in xf.start() File "/usr/sbin/xfdown", line 117, in start self.Login(True) File "/usr/sbin/xfdown", line 399, in Login self.request_login() File "/usr/sbin/xfdown", line 169, in __request_login self.main() File "/usr/sbin/xfdown", line 182, in main self.getlist() File "/usr/sbin/xfdown", line 208, in getlist res=json.JSONDecoder().decode(self.getlogin()) File "/usr/lib/python2.7/json/decoder.py", line 366, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/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

mastergyp commented 11 years ago

'http://lixian.qq.com/handler/lixian/do_lixian_login.php' 做了简单的referer验证 ,添加个header就可以了:

opener.addheaders = [('User-Agent', 'Mozilla/5.0'),("Referer","http://lixian.qq.com/main.html")]

pufei commented 11 years ago

还是不行

添加 opener.addheaders = [('User-Agent', 'Mozilla/5.0'),("Referer","http://lixian.qq.com/main.html")]

显示

File "xfdown.py", line 445, in xf.start() File "xfdown.py", line 117, in start self.main() File "xfdown.py", line 184, in main self.getlist() File "xfdown.py", line 210, in getlist res=json.JSONDecoder().decode(self.__getlogin()) File "/usr/lib/python2.7/json/decoder.py", line 365, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python2.7/json/decoder.py", line 383, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded

mastergyp commented 11 years ago

嗯 还要加个函数,我forked了 https://github.com/mastergyp/xfdown 刚试过了,这个应该可以。

pufei commented 11 years ago

是要重新下载么?

pufei commented 11 years ago

但是下载那个还是显示三个月前更新的说

mastergyp commented 11 years ago

再试试

pufei commented 11 years ago

的确可以用了,谢谢好心人

pufei commented 11 years ago

居然又报错............

Traceback (most recent call last): File "xfdown.py", line 455, in xf.start() File "xfdown.py", line 124, in start self.Login(True) File "xfdown.py", line 417, in Login self.verifycode = self.getverifycode() File "xfdown.py", line 150, in getverifycode str = self.request(url = urlv) File "xfdown.py", line 133, in __request fp=request.urlopen(url) File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen return _opener.open(url, data, timeout) File "/usr/lib/python2.7/urllib2.py", line 401, in open response = self._open(req, data) File "/usr/lib/python2.7/urllib2.py", line 419, in _open '_open', req) File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain result = func(*args) File "/usr/lib/python2.7/urllib2.py", line 1211, in http_open return self.do_open(httplib.HTTPConnection, req) File "/usr/lib/python2.7/urllib2.py", line 1181, in do_open raise URLError(err) urllib2.URLError: <urlopen error [Errno -2] Name or service not known>

mastergyp commented 11 years ago

验证码没取回来吧,我这里还是可以用

发自我的 iPhone

在 2012-11-29,3:23,pufei notifications@github.com 写道:

居然又报错............

Traceback (most recent call last): File "xfdown.py", line 455, in xf.start() File "xfdown.py", line 124, in start self.Login(True) File "xfdown.py", line 417, in Login self.verifycode = self.getverifycode() File "xfdown.py", line 150, in getverifycode str = self.request(url = urlv) File "xfdown.py", line 133, in __request fp=request.urlopen(url) File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen return _opener.open(url, data, timeout) File "/usr/lib/python2.7/urllib2.py", line 401, in open response = self._open(req, data) File "/usr/lib/python2.7/urllib2.py", line 419, in _open '_open', req) File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain result = func(*args) File "/usr/lib/python2.7/urllib2.py", line 1211, in http_open return self.do_open(httplib.HTTPConnection, req) File "/usr/lib/python2.7/urllib2.py", line 1181, in do_open raise URLError(err) urllib2.URLError:

— Reply to this email directly or view it on GitHub.

chenfengyuan commented 11 years ago

表示mastergyp的我这里也可以用,脚本又恢复awesome状态了:D Great job!

Sent from my iPhone

On 2012-11-29, at 18:54, mastergyp notifications@github.com wrote:

验证码没取回来吧,我这里还是可以用

发自我的 iPhone

在 2012-11-29,3:23,pufei notifications@github.com 写道:

居然又报错............

Traceback (most recent call last): File "xfdown.py", line 455, in xf.start() File "xfdown.py", line 124, in start self.Login(True) File "xfdown.py", line 417, in Login self.verifycode = self.getverifycode() File "xfdown.py", line 150, in getverifycode str = self.request(url = urlv) File "xfdown.py", line 133, in __request fp=request.urlopen(url) File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen return _opener.open(url, data, timeout) File "/usr/lib/python2.7/urllib2.py", line 401, in open response = self._open(req, data) File "/usr/lib/python2.7/urllib2.py", line 419, in _open '_open', req) File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain result = func(*args) File "/usr/lib/python2.7/urllib2.py", line 1211, in http_open return self.do_open(httplib.HTTPConnection, req) File "/usr/lib/python2.7/urllib2.py", line 1181, in do_open raise URLError(err) urllib2.URLError:

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub.

SimonFu commented 11 years ago

Traceback (most recent call last): File "/opt/xfdown-master/xfdown.py", line 455, in xf.start() File "/opt/xfdown-master/xfdown.py", line 124, in start self.Login(True) File "/opt/xfdown-master/xfdown.py", line 429, in Login self.request_login() File "/opt/xfdown-master/xfdown.py", line 175, in __request_login self.getlogin() File "/opt/xfdown-master/xfdown.py", line 209, in getlogin str = self.request(url =urlv,data={"g_tk":get_gtk(skey)},savecookie=True) File "/opt/xfdown-master/xfdown.py", line 131, in __request fp=request.urlopen(url,data) File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen return _opener.open(url, data, timeout) File "/usr/lib/python2.7/urllib2.py", line 400, in open response = self._open(req, data) File "/usr/lib/python2.7/urllib2.py", line 418, in _open '_open', req) File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain result = func(*args) File "/usr/lib/python2.7/urllib2.py", line 1207, in http_open return self.do_open(httplib.HTTPConnection, req) File "/usr/lib/python2.7/urllib2.py", line 1177, in do_open raise URLError(err) urllib2.URLError: <urlopen error [Errno 110] Connection timed out>

kikyous commented 11 years ago

现在应该好好了