tianjyan / py-qzone-photo

Python2: 获取QQ空间相册
Apache License 2.0
45 stars 13 forks source link

  无法登陆 #7

Closed Qlep-xx closed 7 years ago

Qlep-xx commented 7 years ago

谢谢您的解答! 这次好像是登录错误,麻烦你看看! C:\Users\bai\Downloads\Qzone_Photo-master>Python main.py 姝e湪鐧婚檰... Traceback (most recent call last): File "main.py", line 18, in qz.login(824651397, 'Password') File "C:\Users\bai\Downloads\Qzone_Photo-master\qphoto__init.py", line 38, in login request.login() File "A:\Toolkit\python\lib\qqlib\init__.py", line 190, in login raise LogInError(r[4]) qqlib.LogInError: <exception str() failed>

C:\Users\bai\Downloads\Qzone_Photo-master>

tianjyan commented 7 years ago

Hi,没有复现出这个问题,请问你是怎么搭建环境的?

Qlep-xx commented 7 years ago

你好,先安装了安装Python 2.7.13和pip,然后按你说的安装依赖:pip install -r requirements.txt,接着把qqlib复制的到Lib文件夹内,最后修改main.py,在命令提示符中移动到Qzone_Photo-master文件夹下,键入Python main.py运行出现此问题。(Python小白,是不是不能这么复制啊Orz~) 再次感谢解答!

tianjyan commented 7 years ago

能尝试下不复制qqlib吗

Qlep-xx commented 7 years ago

蒽蒽,python小白莫怪。已经安装了: Using a:\toolkit\python\lib\site-packages Searching for pyasn1==0.2.3 Best match: pyasn1 0.2.3 Adding pyasn1 0.2.3 to easy-install.pth file

Using a:\toolkit\python\lib\site-packages Finished processing dependencies for qqlib==1.0.0

但Python main.py时,提示: Traceback (most recent call last): File "main.py", line 18, in qz.login(824651397, 'Password') File "C:\Users\bai\Downloads\Qzone_Photo-master\qphoto__init.py", line 38, in login request.login() File "A:\Toolkit\python\lib\qqlib\init__.py", line 190, in login raise LogInError(r[4]) qqlib.LogInError: <exception str() failed>

或者是: Traceback (most recent call last): File "main.py", line 18, in qz.login(1364542689, '824651397') File "C:\Users\bai\Downloads\Qzone_Photo-master\qphoto__init__.py", line 42, in login open('verify.jpg', 'wb').write(verifier.image) AttributeError: Verifier instance has no attribute 'image'

是不是main.py修改不正确呢?麻烦再次解答下,谢谢!!!

tianjyan commented 7 years ago

你的账号和密码正确吗?

gera2ld commented 7 years ago

1.1.0把验证码的获取机制变了一下,应该写成:

open('verify.jpg', 'wb').write(verifier.fetch_image())
tianjyan commented 7 years ago

@gera2ld Thanks a lot.

tianjyan commented 7 years ago

@Qlep-xx 我更新了qqlib的版本,请帮忙测试下你的环境下是否能正常使用。代码分支如下:Develop Branch

Qlep-xx commented 7 years ago

谢谢解答。我测试了,这次是获取不到相册信息,代码如下: C:\Users\bai\Downloads\Qzone_Photo-master>Python main.py 姝e湪鐧婚檰... 鐧诲綍瀹屾垚! 获取:973751360的相册信息 获取相册集失败:qq-973751360 Traceback (most recent call last): File "C:\Users\bai\Downloads\Qzone_Photo-master\qphoto__init__.py", line 72, in getablums response = urllib2.urlopen(request, timeout=10) File "A:\Toolkit\python\lib\urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "A:\Toolkit\python\lib\urllib2.py", line 429, in open response = self._open(req, data) File "A:\Toolkit\python\lib\urllib2.py", line 447, in _open '_open', req) File "A:\Toolkit\python\lib\urllib2.py", line 407, in _call_chain result = func(*args) File "A:\Toolkit\python\lib\urllib2.py", line 1228, in http_open return self.do_open(httplib.HTTPConnection, req) File "A:\Toolkit\python\lib\urllib2.py", line 1201, in do_open r = h.getresponse(buffering=True) File "A:\Toolkit\python\lib\httplib.py", line 1121, in getresponse response.begin() File "A:\Toolkit\python\lib\httplib.py", line 438, in begin version, status, reason = self._read_status() File "A:\Toolkit\python\lib\httplib.py", line 394, in _read_status line = self.fp.readline(_MAXLINE + 1) File "A:\Toolkit\python\lib\socket.py", line 480, in readline data = self._sock.recv(self._rbufsize) timeout: timed out 读取到得相册个数为0 获取:973751361的相册信息

tianjyan commented 7 years ago

@Qlep-xx 我更新了一个版本,代码分支如下:Develop Branch

tianjyan commented 7 years ago

@Qlep-xx 你好,请问解决你的问题了吗?如果没有新的更新的话,我会合并代码并关闭这个issue。

Qlep-xx commented 7 years ago

不好意思啊,这两天比较忙,忘了上线回复了!!! 所有的问题都解决了,再次感谢大神!!!