Comments (8)
@dearrrfish 已修复
from wechatsogou.
本地py27测试通过了。你不能运行吗,贴出错误看一下。
from wechatsogou.
可以运行了。msglist = re.findall("var msgList = '(.+?)';", text, re.S)[0]出问题,查看了,是搜狗要求验证码。
from wechatsogou.
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)
from wechatsogou.
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
from wechatsogou.
http://stackoverflow.com/questions/21122540/python-input-error-nameerror-name-is-not-defined
from wechatsogou.
你好,首先十分感谢你这个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的版本还是什么导致的?麻烦告知一下解决方法,万分感谢!
from wechatsogou.
感谢作者!在使用test.py的时候,测试前几个功能都没有问题,但是在搜索获取热门文章的时候,logging提示TypeError: not all arguments converted during string formatting,使用的python版本是2.7.11
from wechatsogou.
Related Issues (20)
- 为什么报没有API接口的错误? HOT 2
- 现在import 就报错找不到模块是什么问题
- 请问这个项目还可以用吗,还在维护吗 HOT 1
- 获取不到公众号文章链接,profile_url为空 HOT 1
- bug: ModuleNotFoundError: No module named 'werkzeug.contrib' HOT 2
- 这代码咋使用,运行test里面的文件吗,通过不了,报下面错误,大佬怎么操作的
- 怎么获取微信公众号的biz
- [Bug report]有依赖损坏 HOT 1
- 关于验证码解决的问题。就是禁止验证码出现 HOT 7
- 网络请求太频繁,微信觉得框架异常,所以会出现验证码 HOT 1
- 模块已经安装,报错ModuleNotFoundError: No module named 'werkzeug.contrib' HOT 4
- 怎么解决验证码问题 HOT 4
- get_gzh_article_by_history文章列表为空 HOT 2
- 无法解析带有*的文章链接 HOT 1
- python3.8 安装完包执行报错 HOT 2
- ws_api.get_gzh_info 调用这个接口报这个错误 ('WechatSogouAPI get img', <Response [403]>)
- 运行demo没有反应,直接退出了 HOT 1
- 博主有联系方式吗?想谈合作~ HOT 2
- ('WechatSogouAPI get img', <Response [403]>)加上代理也一样报,如何解决403? HOT 4
- get_gzh_info方法为啥每次都返回None。公众号确定存在 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wechatsogou.