Git Product home page Git Product logo

openlawclawer's Introduction

openlawClawer V1.1 使用手册文档

通知:即将全面更新系统,将新增自动注册账号、接入自有验证码识别系统(价格超低,超稳定)等全新功能,全面优化系统稳定性,爬虫学习爱好者可加QQ群:119794042

Github All Releases  :Read the Docs

环境条件

使用环境 版本要求
Python >= 3
PhantomJs >= 2.0
Redis >= 3
MongoDB >= 2.6

开始安装

安装手册以Ubuntu16.04系统为标准,其他系统不保证稳定性,您也可以通过提交Pull Request添加您所使用系统的本产品安装手册作为补充!

  1. 安装Python3以及PhantomJs环境
sudo apt-get install python3.5

PhantomJs只需要主端安装

sudo apt-get install phantomjs
  1. 安装PIP包依赖
pip3 install -r requirements.txt
  1. 获得程序
git clone https://github.com/sml2h3/openlawClawer.git

配置程序

配置Celery

打开Config目录,找到celeryconfig.py文件

BROKER

broker_url 为redis redis_url格式为

账号 

打开Account文件夹,按照[username,password]的数组格式添加openlaw的账号,多多益善,openlaw封禁账号很容易,越多越不容易被封,一般1-2天解封

redis://:password@hostname:port/db_number

broker_url = "redis://127.0.0.1"

RESULT_BACKEND

result_backend为mongodb mongodb_url格式为

mongodb://userid:password@hostname:port/database_name

result_backend = "mongodb://127.0.0.1/celery"

验证码识别[超级鹰]

注册、充值后新建软件,然后打开Core/Chaoji.py 进行配置username、password、soft_id

代理IP提取

经过在开发中使用各家的产品结合openlaw网站爬取的特殊性,经过慎重考虑将采用无忧代理的爬虫代理IP产品(非广告),当然也可使用作者github中的代理池工具做提取。 打开Tasks目录中的get_content文件,修改第13行get_ip变量,将{order}替换成你的订单号。(如果您不是使用无忧代理,还需额外修改第15行Host的值)

运行使用

  • 主端直接运行
python3 openlawClawer.py

如果您是在vps云上运行的请先安装xvfb: sudo apt-get install xvfb 然后使用如下命令启动: xvfb-run python3 openlawClawer.py 否则可能会引起PhantomJs报错

  • 子端在项目根目录运行
celery worker -A app -l info -concurrency=5

其中concurrency参数制定子节点并发数,默认5即可,过大可能会引发一些突发问题(如代理IP提取频率受限等,量力而行),如果使用本地代理池进行提取代理IP,可以考虑增大。最好不要超过10

捐赠支持

本项目无偿给大家使用,但每一个版本的维护都需要作者的精力才得以维持。如果本项目为您或者贵公司带来了很多方便,可以通过Star或捐赠的方式支持作者继续维护本项目。毕竟Openlaw网站最近更新的有点频繁,哈哈。感谢各位支持!捐赠后我会定期将捐赠者(捐赠大于30元)的名单发布在本README,您可以在备注中额外添加您的公司主页或者个人主页,将统一展示在下方。 enter description hereenter description here

本项目是经过测试后才提交,故如有技术问题可提交ISSUE或者考虑收费服务。如您需要有偿服务解决问题,可微信或支付宝扫码并在转账留言留下您的联系方式并标注需要解决问题,我会在下班后与您进行联系。

捐赠名单 主页
李佳璐 -
北京敬一科技有限公司 -
路人甲(捐助者希望匿名) -

openlawclawer's People

Contributors

sml2h3 avatar wqj97 avatar

Watchers

 avatar

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.