Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

py2.7 什么时候支持? #7

Closed
lightcax opened this issue Sep 19, 2016 · 8 comments
Closed

py2.7 什么时候支持? #7

lightcax opened this issue Sep 19, 2016 · 8 comments

Comments

@lightcax
Copy link

py2.7 什么时候支持?

@chyroc
Copy link
Owner

chyroc commented Sep 19, 2016

本地py27测试通过了。你不能运行吗,贴出错误看一下。

@lightcax
Copy link
Author

可以运行了。msglist = re.findall("var msgList = '(.+?)';", text, re.S)[0]出问题,查看了,是搜狗要求验证码。

@dearrrfish
Copy link

2.7.9 下测试 test.py 还是有兼容性问题:

 $ python test.py
Traceback (most recent call last):
  File "test.py", line 8, in <module>
    wechats = WechatSogouApi()
  File "/Users/yjin/mango/codes/WechatSogou/wechatsogou/api.py", line 17, in __init__
    super().__init__(**kwargs)
TypeError: super() takes at least 1 argument (0 given)

@chyroc
Copy link
Owner

chyroc commented Sep 23, 2016

@dearrrfish 已修复

@lightcax
Copy link
Author

img_code = input("please input code: ")

验证码不是字符型吗?
please input code: ccyf
Traceback (most recent call last):
File "E:\WechatSogou-master\test.py", line 23, in
data = wechats.get_gzh_message(wechatid='nanhangqinggong')
File "E:\WechatSogou-master\wechatsogou\api.py", line 195, in get_gzh_message
text = self._get_gzh_article_by_url_text(url)
File "E:\WechatSogou-master\wechatsogou\basic.py", line 327, in _get_gzh_artic
le_by_url_text
self._ocr_for_get_gzh_article_by_url_text(url)
File "E:\WechatSogou-master\wechatsogou\basic.py", line 199, in _ocr_for_get_g
zh_article_by_url_text
img_code = input("please input code: ")
File "", line 1, in
NameError: name 'ccyf' is not defined

@william2177
Copy link

你好,首先十分感谢你这个project。我的Python版本是2.7.9,在跑test.py的时候出现了api.py 198行gzh_info['url'] has no attribute 'getitem'的问题。我稍微看了一下,是因为search_gzh_info这个function没有获得任何内容,返回了一个空的list。里面所有的page.xpath(xxx)所返回的内容也都是空的,但是第40行的text我print出来确实取得了完整的html代码。不知道是xpath的那个module的版本还是什么导致的?麻烦告知一下解决方法,万分感谢!

@jing0523
Copy link

jing0523 commented Nov 4, 2016

感谢作者!在使用test.py的时候,测试前几个功能都没有问题,但是在搜索获取热门文章的时候,logging提示TypeError: not all arguments converted during string formatting,使用的python版本是2.7.11

@chyroc chyroc closed this as completed Nov 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants