Closed djhui closed 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")]
还是不行
添加 opener.addheaders = [('User-Agent', 'Mozilla/5.0'),("Referer","http://lixian.qq.com/main.html")]
显示
File "xfdown.py", line 445, in
嗯 还要加个函数,我forked了 https://github.com/mastergyp/xfdown 刚试过了,这个应该可以。
是要重新下载么?
但是下载那个还是显示三个月前更新的说
再试试
的确可以用了,谢谢好心人
居然又报错............
Traceback (most recent call last):
File "xfdown.py", line 455, in
验证码没取回来吧,我这里还是可以用
发自我的 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.
表示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.
Traceback (most recent call last):
File "/opt/xfdown-master/xfdown.py", line 455, in
现在应该好好了
从今天开始,这个脚本不工作了,错误如下,不知道是腾讯改过东西了还是临时现象 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