Giter Site home page Giter Site logo

hhy5277 / netdiscovery Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fengzhizi715/netdiscovery

0.0 1.0 0.0 18.02 MB

NetDiscovery 是基于 Vert.x、RxJava 2 等框架实现的爬虫框架,未来打算打造成一个通用的爬虫程序。

License: Apache License 2.0

Java 85.76% JavaScript 2.81% HTML 0.72% Kotlin 10.71%

netdiscovery's Introduction

NetDiscovery

@Tony沈哲 on weibo License Codacy Badge

功能特点:

  • 轻量级爬虫
  • 约定大于配置
  • 模块化设计,便于扩展:支持多种消息队列、多种网络框架,也支持自己实现。
  • 多线程、异步化:底层使用 RxJava 的多线程机制
  • 支持 Kotlin 协程
  • 支持 JS 渲染
  • 支持分布式
  • Request 支持自定义header信息
  • Request 支持 debug 功能:在调试时可以使用 RxCache,从而避免多次请求同一个网页。
  • 支持失败重试的机制
  • 代理池的整合
  • 支持 User Agaent 池、Cookies 池
  • 支持爬虫的深度抓取:能够在 Pipeline 中发起深度抓取的事件。
  • 支持 URL 去重:使用布隆过滤器
  • 超时控制:支持设置爬虫请求的超时时间;
  • 爬虫的监控
  • agent 模块能够对当前服务器的 CPU 和内存进行实时监控

最新版本

模块名 最新版本
netdiscovery-core Download
netdiscovery-extra Download
netdiscovery-selenium Download
netdiscovery-dsl Download
netdiscovery-coroutines Download

NetDiscovery 是基于 Vert.x、RxJava 2 等框架实现的爬虫框架。目前处于早期版本,很多细节正在不断地完善中。

对于 Java 工程,如果使用 gradle 构建,由于默认没有使用 jcenter(),需要在相应 module 的 build.gradle 中配置

repositories {
    mavenCentral()
    jcenter()
}

下载:

netdiscovery-core

implementation 'com.cv4j.netdiscovery:netdiscovery-core:0.3.7'

netdiscovery-extra

implementation 'com.cv4j.netdiscovery:netdiscovery-extra:0.3.7'

netdiscovery-selenium

implementation 'com.cv4j.netdiscovery:netdiscovery-selenium:0.3.7'

netdiscovery-dsl

implementation 'com.cv4j.netdiscovery:netdiscovery-dsl:0.3.7'

netdiscovery-coroutines

implementation 'com.cv4j.netdiscovery:netdiscovery-coroutines:0.3.7'

详细功能查看wiki

案例:

  • user-agent-list:抓取常用浏览器的user agent
  • 在“Java与Android技术栈”公众号回复数字货币的关键字,获取最新的价格

TODO List:

  1. 完善 wiki,增加各个模式的使用说明
  2. 各个模块能够从配置文件中获取爬虫相应的配置
  3. 增强 HtmlUnit 模块
  4. 增加 chromium 的支持
  5. 从五个纬度控制爬取速度(Pipeline、Request、Domain、IP、Download_Delay),后期可支持交叉
  6. 整合cv4j以及 Tesseract,实现 OCR 识别的功能

Contributors:

联系方式:

Wechat:fengzhizi715

Java与Android技术栈:每周更新推送原创技术文章,欢迎扫描下方的公众号二维码并关注,期待与您的共同成长和进步。

License

Copyright (C) 2017 - present, Tony Shen.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

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.