• Stars
    star
    635
  • Rank 68,193 (Top 2 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created over 6 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

NetDiscovery 是一款基于 Vert.x、RxJava 2 等框架实现的通用爬虫框架/中间件。

NetDiscovery

@Tony沈哲 on weibo License Codacy Badge

功能特点:

  • 轻量级爬虫
  • 模块化设计,便于扩展:支持多种消息队列(Disruptor、Redis、Kafka、RabitMQ、RocketMQ)、多种网络框架(Http Client、Okhttp3、Selenium等),也支持自己实现。
  • 支持分布式
  • 多线程、异步化:底层使用 RxJava 2 的多线程机制
  • 支持线程池隔离:爬虫的 Parser、Pipeline 过程可以放在独立的线程池中进行处理
  • 支持 Request 动态添加到正在运行爬虫的 Queue 中
  • 支持 Kotlin 协程
  • 支持 JS 渲染
  • 支持 Request 自定义 header 信息
  • 支持 debug 功能:在调试时 Request 可以打开 debug 的开关,使用 Local Cache(RxCache) 存储请求的结果,从而避免多次请求同一个网页。
  • 支持失败重试的机制
  • 多纬度控制爬取速度(Pipeline、Request、Download、Domain)等等
  • 支持代理池、User Agent 池、Cookies 池
  • 支持爬虫的深度抓取:能够在 Pipeline 中发起深度抓取
  • 支持 URL 去重:使用布隆过滤器
  • 支持 Spider 的监控、SpiderEngine 的监控 (基于Etcd、Zookeeper)
  • agent 模块能够对当前服务器的 CPU 和内存进行实时监控
  • SpiderEngine 整合 Quartz
  • SpiderEngine 提供 http、RPC 接口

最新版本

模块名 最新版本
netdiscovery-core-core Download
netdiscovery-core-engine Download
netdiscovery-core-engine-monitor Download
netdiscovery-downloader-htmlunit Download
netdiscovery-downloader-httpclient Download
netdiscovery-downloader-okhttp Download
netdiscovery-downloader-selenium Download
netdiscovery-pipeline-couchbase Download
netdiscovery-pipeline-elasticsearch Download
netdiscovery-pipeline-mongo Download
netdiscovery-pipeline-redis Download
netdiscovery-queue-kafka Download
netdiscovery-queue-rabbitmq Download
netdiscovery-queue-redis Download
netdiscovery-queue-rocketmq Download
netdiscovery-kotlin-coroutines Download
netdiscovery-kotlin-dsl Download

NetDiscovery 是基于 Vert.x、RxJava 2 等框架实现的爬虫框架。目前仍在不断地完善中,期望能成为通用的爬虫框架。

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

Gradle

repositories {
    jcenter()
}

Maven

<repositories>
    <repository>
        <id>central</id>
        <name>bintray</name>
        <url>https://jcenter.bintray.com</url>
    </repository>
</repositories>

在 NetDiscovery 中,Spider 可以单独运行,Spider 也可以交给 SpiderEngine 来控制。

SpiderEngine 可以在运行之前注册到 Etcd/Zookeeper,然后由 monitor 对 SpiderEngine 进行监控。

Stargazers over time

Stargazers over time

详细功能查看wiki

下载

案例:

基于本人的开源项目

TODO List:

  • Kotlin 版本增加 Kotlin-Cli
  • 整合 OpenCV 以及 Tesseract,实现 OCR 识别的功能
  • 增加 admin 模块
  • 支持 Consul
  • 增强 HtmlUnit 模块
  • 增加 chromium 的支持
  • 完善 wiki,增加各个模式的使用说明
  • 支持 RxJava 3.x
  • 支持 Java 11
  • 支持 docker

Contributors:

Contributing:

Pull requests are welcome

联系方式:

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.

More Repositories

1

ProxyPool

给爬虫使用的代理IP池
Java
548
star
2

SAF

(Deprecated) SAF(Simple Android Framework)是一个简单的android框架,它为开发Android app提供了基础性组件。
Java
299
star
3

SAF-Kotlin-log

完全基于 Kotlin 开发的 Android 日志框架,提供极简的 API
Kotlin
269
star
4

SAF-AOP

android的AOP框架,支持android studio、gradle最新版本
Java
262
star
5

user-agent-list

常用浏览器的user-agent列表
Java
234
star
6

SAF-Kotlin-Utils

用 Kolin 做的 Android Utils 库,包括 utils 和 extension
Kotlin
187
star
7

AnalysisApp

一个快速分析某个app使用哪些sdk的小工具
Groovy
163
star
8

AndroidServer

基于 Kotlin + Netty 开发,为 Android App 提供 Server 的功能,包括 Http、TCP、WebSocket 服务
Kotlin
140
star
9

RxCache

A local reactive cache for Java and Android. Now, it supports heap memory、off-heap memory and disk cache.
Java
136
star
10

RxJavaInAction

《RxJava2.x 实战》一书中包含的例子。
Java
120
star
11

saf-logginginterceptor

Android项目中,OKHttp的日志的拦截器
Java
87
star
12

kotlin_tutorial

掘金的小册《Android 进阶:基于 Kotlin 的 Android App 开发实践》中的相关的例子
Kotlin
59
star
13

Tess-TwoDemo

Java
56
star
14

PicCrawler

使用RxJava2 和 Java 8的特性开发的图片爬虫
Java
55
star
15

Netty4Android

Kotlin + Netty 在 Android 上实现 Socket 的服务端 demo
Kotlin
53
star
16

Lifecycle-Coroutines-Extension

AAC 的 Lifecycle 结合 Kotlin Coroutines 进行使用
Kotlin
49
star
17

SAF-Object-Delegate

基于 Kotlin 的委托机制实现对 Extra、SharedPreferences 的封装。已经适配 AndroidX
Kotlin
46
star
18

TFLite-MnistDemo

Kotlin
46
star
19

adbd-connector

Kotlin
43
star
20

bytekit

Java 字节操作的工具库(不是字节码的工具库)
Java
39
star
21

EventBus

使用 Kotlin Coroutine 开发的 EventBus
Kotlin
39
star
22

RxCache4a

RxCache(https://github.com/fengzhizi715/RxCache) for Android
Java
35
star
23

okhttp-extension

okhttp-extension 是针对 okhttp 3 增强的网络框架。使用 Kotlin 特性编写,提供便捷的 DSL 方式创建网络请求,支持协程、响应式编程等等。
Kotlin
35
star
24

blockchain_study

Java
33
star
25

SAF-Kotlin-Router

android路由框架,支持模块化架构
Java
32
star
26

NetDiagnose

Android 网络诊断工具,使用 Kotlin + LiveData + MVVM + Coroutines 开发
Kotlin
26
star
27

KStateMachine

使用 Kotlin 特性实现的有限状态机 (FSM) 框架,基于事件驱动。
Kotlin
24
star
28

kotlin-spring-demo

Kotlin 整合 Spring Boot 2的例子
Kotlin
19
star
29

kvalidation

基于 Kotlin 特性实现的验证框架
Kotlin
17
star
30

LiveDataExtension

Kotlin
16
star
31

Kotlin-Coroutines-Utils

Kotlin Coroutines 的工具类库
Kotlin
16
star
32

RxJava-Utils

在日常开发实践中,本人所积累的 RxJava 相关的工具类
Kotlin
12
star
33

RxConditions

Java
11
star
34

SAF-Kotlin-InjectView

用Kotlin打造的简化版本的ButterKnife
Kotlin
8
star
35

okhttp-logging-interceptor

支持 Android、桌面、后端项目使用的 okhttp 日志拦截器
Kotlin
7
star
36

tony-common

个人java 后台项目中总结的常用类
Java
7
star
37

MLogCat

Java
6
star
38

kcommand

kcommand 是基于 Kotlin 特性实现的执行 Linux/Windows 命令的库
Kotlin
6
star
39

Advance-Kotlin-Tutorials

Kotlin
5
star
40

PubSub

使用 Kotlin Coroutines 实现的 Local Pub/Sub、Event Bus、Message Bus
Kotlin
5
star
41

kotlin-spring-reactive-coroutine-demo

Kotlin 使用 WebFlux、RxJava2 以及 coroutines 的例子
Kotlin
4
star
42

Vertxs

对Vert.x框架的封装
Java
3
star
43

FXHParser

抓取非小号数字货币
Java
2
star
44

NetDiscovery-Admin

Java
2
star
45

multi-level-cache

A multi-level cache framework implemented by RxCache(local cache) and Redis(remote cache).
1
star
46

websocket-demo

Kotlin
1
star
47

kjdbc

Kotlin
1
star
48

retrofit-SAF

saf 的 retrofit 框架,去掉gson和appengin以及okhttp依赖,使用saf中的fastjson和restclient替代
Java
1
star