Code Monkey home page Code Monkey logo

Comments (8)

chyroc avatar chyroc commented on August 17, 2024 1

@dearrrfish 已修复

from wechatsogou.

chyroc avatar chyroc commented on August 17, 2024

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

from wechatsogou.

lightcax avatar lightcax commented on August 17, 2024

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

from wechatsogou.

dearrrfish avatar dearrrfish commented on August 17, 2024

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.

lightcax avatar lightcax commented on August 17, 2024

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.

dearrrfish avatar dearrrfish commented on August 17, 2024

http://stackoverflow.com/questions/21122540/python-input-error-nameerror-name-is-not-defined

from wechatsogou.

william2177 avatar william2177 commented on August 17, 2024

你好,首先十分感谢你这个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.

jing0523 avatar jing0523 commented on August 17, 2024

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

from wechatsogou.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.