Giter VIP home page Giter VIP logo

weixinpubliccrawler's Introduction

微信公众号爬虫(搜狗端)

介绍

  • scrapy框架爬取,selenium用于处理验证码以及登陆。
  • 支持爬取公众号主体以及相关文章。
  • 只需登陆一次,自动存储用户凭证。
  • 可接入代理池,自由切换代理。
  • 遇到验证码反爬,可截取验证码图片,等待用户输入正确验证码。

使用

  1. 设置setting中的最大爬取页数MAX_PAGE。
  2. 启动命令: scrapy crawl sogou_weixin
  3. 根据提示输入想爬取的关键字,例如:吉他

其他

  • 如果想以表格形式导出爬取内容:
    scrapy crawl sogou_weixin -o xxxx.csv
  • 如果想接入proxy池,先在setting中设置PROXY_URL。然后取消middleware.py中proxy中间件的注释。

待办

  • 接入第三方打码平台 ...... [ ]

weixinpubliccrawler's People

Contributors

joey0326 avatar

Stargazers

 avatar Hsuching avatar AlanQuain avatar  avatar 王玺 avatar cousepig avatar Yongliang avatar  avatar  avatar Zou Xiao Hui avatar  avatar

Watchers

laulunsi avatar  avatar

Forkers

pusstang

weixinpubliccrawler's Issues

你好,输入关键字后,一直报错,请教一下,是什么原因呢?感谢

image

please input the word for search:西安美食团
[+] using headers!
2022-03-25 10:48:45 [scrapy.core.scraper] ERROR: Error downloading <GET https://weixin.sogou.com/weixin?query=%E8%A5%BF%E5%AE%89%E7%BE%8E%E9%A3%9F%E5%9B%A2&_sug_type_=&s_from=input&_sug_=n&type=1&page=1&ie=utf8>
Traceback (most recent call last):
File "F:\ProgramFiles\anaconda3\envs\py36_gongzhonghao_env\lib\site-packages\twisted\internet\defer.py", line 1660, in _inlineCallbacks
result = current_context.run(gen.send, result)
File "F:\ProgramFiles\anaconda3\envs\py36_gongzhonghao_env\lib\site-packages\twisted\internet\defer.py", line 62, in run
return f(*args, **kwargs)
File "F:\ProgramFiles\anaconda3\envs\py36_gongzhonghao_env\lib\site-packages\scrapy\core\downloader\middleware.py", line 41, in process_request
'elapsed_time_seconds': 13.716245,
'finish_reason': 'finished',
'finish_time': datetime.datetime(2022, 3, 25, 2, 48, 45, 351655),
'log_count/DEBUG': 1,
'log_count/ERROR': 1,
'log_count/INFO': 10,
'scheduler/dequeued': 1,
'scheduler/dequeued/memory': 1,
'scheduler/enqueued': 1,
'scheduler/enqueued/memory': 1,
'start_time': datetime.datetime(2022, 3, 25, 2, 48, 31, 635410)}
2022-03-25 10:48:45 [scrapy.core.engine] INFO: Spider closed (finished)

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.