xtuhcy/gecco
xtuhcy/gecco has 2,511 GitHub stars and 866 forks. GitHot measured 0 stars in 24 hours and -1 in 7 days. Last checked 2026-11-12 14:59 UTC. Last push 2026-10-09.
Easy to use lightweight web crawler(易用的轻量化网络爬虫)
What you can do
- Easy to use, use jQuery style selector to extract elements
- Support for asynchronous Ajax requests in the page
- Support page JavaScript variable extraction
- Using Redis to realize distributed crawling,reference gecco-redis
측정된 스타 증가
- in 24h
- 0
- in 7 days
- -1
- in 15 days
- 업데이트 지연
- in 1 month
- 업데이트 지연
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original欢迎体验【问问志选】
志愿不靠猜,数据说了算。问问志选——北京、天津、湖南考试院官方录取数据,智能推荐院校专业。
What is Gecco
Gecco is a easy to use lightweight web crawler developed with java language.Gecco integriert jsoup, httpclient, fastjson, spring, htmlunit, redission ausgezeichneten framework,Let you only need to configure a number of jQuery style selector can be very quick to write a crawler.Gecco framework has excellent scalability, the framework based on the principle of open and close design, to modify the closure, the expansion of open.At the same time Gecco is based on a very open MIT open source protocol, whether you are a user or want to jointly improve the Gecco developer, welcome to request pull.If you like the crawler framework,please star or fork!
Main features
- Easy to use, use jQuery style selector to extract elements
- Support for asynchronous Ajax requests in the page
- Support page JavaScript variable extraction
- Using Redis to realize distributed crawling,reference gecco-redis
- Support the development of business logic with Spring,reference gecco-spring
- Support htmlunit extension,reference gecco-htmlunit
- Support extension mechanism
- Support download UserAgent random selection
- Support the download proxy server randomly selected
Framework overview

Download
Download via Maven
<dependency>
<groupId>com.geccocrawler</groupId>
<artifactId>gecco</artifactId>
<version>x.x.x</version>
</dependency>
Dependent project
httpclient,jsoup,fastjson,reflections,cglib,rhino,log4j,jmxutils,commons-lang3
Quick start
@Gecco(matchUrl="https://github.com/{user}/{project}", pipelines="consolePipeline")
public class MyGithub implements HtmlBean {
private static final long serialVersionUID = -7127412585200687225L;
@RequestParameter("user")
private String user;
@RequestParameter("project")
private String project;
@Text
@HtmlField(cssPath=".pagehead-actions li:nth-child(2) .social-count")
private String star;
@Text
@HtmlField(cssPath=".pagehead-actions li:nth-child(3) .social-count")
private String fork;
@Html
@HtmlField(cssPath=".entry-content")
private String readme;
public String getReadme() {
return readme;
}
public void setReadme(String readme) {
this.readme = readme;
}
public String getUser() {
return user;
}
public void setUser(String user) {
this.user = user;
}
public String getProject() {
return project;
}
public void setProject(String project) {
this.project = project;
}
public String getStar() {
return star;
}
public void setStar(String star) {
this.star = star;
}
public String getFork() {
return fork;
}
public void setFork(String fork) {
this.fork = fork;
}
public static void main(String[] args) {
GeccoEngine.create()
.classpath("com.geccocrawler.gecco.demo")
.start("https://github.com/xtuhcy/gecco")
.thread(1)
.interval(2000)
.loop(true)
.mobile(false)
.start();
}
}
DynamicGecco
The purpose of DynamicGecco is to implement the runtime configuration of the crawl rule without defining the SpiderBean.In fact, the principle is the use of byte code programming, dynamic generation of SpiderBean, but also through the custom GeccoClassLoader to achieve the rule of hot deployment.Below is a simple Demo, more complex Demo can refer to the example below com.geccocrawler.gecco.demo.dynamic.
The following code implements the runtime configuration of the crawl rule:
DynamicGecco.html()
.gecco("https://github.com/{user}/{project}", "consolePipeline")
.requestField("request").request().build()
.stringField("user").requestParameter("user").build()
.stringField("project").requestParameter().build()
.stringField("star").csspath(".pagehead-actions li:nth-child(2) .social-count").text(false).build()
.stringField("fork").csspath(".pagehead-actions li:nth-child(3) .social-count").text().build()
.stringField("contributors").csspath("ul.numbers-summary > li:nth-child(4) > a").href().build()
.register();
GeccoEngine.create()
.classpath("com.geccocrawler.gecco.demo")
.start("https://github.com/xtuhcy/gecco")
.run();
You can see that the DynamicGecco way compared to the traditional way of annotation code greatly reduced, and a very cool point is DynamicGecco to support the operation of the definition and modification of rules.
Demo
教您使用 java 爬虫 gecco 抓取 JD 全部商品信息(一)
教您使用 java 爬虫 gecco 抓取 JD 全部商品信息(二)
教您使用 java 爬虫 gecco 抓取 JD 全部商品信息(三)
一个完整的例子,分页处理,结合 spring,mysql 入库
Similar Tool Comparison
A list of similar tools and how they compare is available here:
Web Archiving Software Comparision
Contact and communication
请作者喝杯咖啡
Gecco 的发展离不开大家支持,扫一扫请作者喝杯咖啡~

License
Please follow the open source protocol MIT!
관련 프로젝트 살펴보기
freeCodeCamp/freeCodeCamp
freeCodeCamp.org의 오픈 소스 코드베이스와 커리큘럼입니다. 수학, 프로그래밍, 컴퓨터 과학을 무료로 배울 수 있습니다.
459,068 스타donnemartin/system-design-primer
대규모 시스템 설계 방법을 배우고 시스템 설계 면접을 준비할 수 있습니다. Anki 플래시카드가 포함되어 있습니다.
377,734 스타react/react
웹과 네이티브 사용자 인터페이스를 위한 라이브러리.
252,565 스타vuejs/vue
Vue 2 저장소입니다. Vue 3은 https://github.com/vuejs/core를 방문하세요.
212,527 스타