Skip to content

Commit

Permalink
更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
tianjx98 committed Nov 13, 2021
1 parent 4caeeea commit c5ce159
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@
# 快速使用

```java
import Element;
import Spider;
import SpiderEngine;
import ScraperElement;
import Response;
import lombok.extern.log4j.Log4j2;
import cn.tianjx98.jscrapy.core.Element;
import cn.tianjx98.jscrapy.core.Spider;
import cn.tianjx98.jscrapy.core.SpiderEngine;
import cn.tianjx98.jscrapy.core.annotation.ScraperElement;
import cn.tianjx98.jscrapy.http.Response;
import reactor.core.publisher.Flux;

@ScraperElement
@Log4j2
public class SimpleSpider implements Spider {
@Override
public String getName() {
return "demoSpider";
return "simpleSpider";
}

@Override
Expand All @@ -27,11 +29,12 @@ public class SimpleSpider implements Spider {
@Override
public Flux<Element> parse(Response response) {
System.out.println(response.getBody());
return null;
return Flux.empty();
}

public static void main(String[] args) throws InstantiationException, IllegalAccessException {
SpiderEngine.start(SimpleSpider.class);
}
}

```
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>

<groupId>cn.tianjx98</groupId>
<artifactId>Jscrapy</artifactId>
<artifactId>jscrapy</artifactId>
<version>1.0.0</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -82,7 +82,7 @@
<repository>
<id>github</id>
<name>GitHub tianjx98 Apache Maven Packages</name>
<url>https://maven.pkg.github.com/tianjx98/repository</url>
<url>https://maven.pkg.github.com/tianjx98/jscrapy</url>
</repository>
</distributionManagement>

Expand Down

0 comments on commit c5ce159

Please sign in to comment.