easycrawl icon indicating copy to clipboard operation
easycrawl copied to clipboard

一个java实现的爬虫工具包

前言

本工程是一个基于java实现的爬虫工具包,初衷是想能简单高效爬取互联网数据,我个人比较感兴趣的还是股票数据,因此测试用例全是爬的股票数据 目前只是个半成品,慢慢来吧。

实现功能

  • 支持http/https html页面、restapi、文件流
  • 文件下载
  • 自动分页并发爬取数据
  • http代理设置

:heavy_exclamation_mark: :point_right: 本项目初衷纯属技术交流,勿作商业用途:heavy_exclamation_mark::bangbang:

测试用例

:ballot_box_with_check: A股所有股票代码

:ballot_box_with_check: 开盘交易日数据

:ballot_box_with_check: 大盘指数(上证、深圳、沪深300)

:ballot_box_with_check: 上市公司历史财报Excel下载

:ballot_box_with_check: 历史分红

:ballot_box_with_check: 公司简介

:ballot_box_with_check: top10 股东

:ballot_box_with_check: 股东人数

测试用例爬取的网站如下

  • 同花顺
  • 新浪财经
  • 雪球
  • 深交所

截图

依赖

  • lombok
  • slf4j
  • logback
  • jsoup
  • fastjson
  • freemarker
  • junit
  • commons-io
  • okhttp

运行

下面是单元测试类,本工程所有测试用例全在这里 https://github.com/kingschan1204/easycrawl/tree/main/src/test/java/com/github/kingschan1204/easycrawl