Jsoup
jsoup é uma biblioteca Java para parse e manipulação de HTML, bastante poderosa para webcrawling
e webscraping
.
Instalação
O suporte ao jsoup está na dependência java-restify-jsoup
. Os handlers
serão registrados automaticamente.
Maven
<dependency>
<groupId>com.github.ljtfreitas</groupId>
<artifactId>java-restify-jsoup</artifactId>
<version>{version}</version>
</dependency>
Gradle
dependencies {
compile("com.github.ljtfreitas:java-restify-jsoup:{version}")
}
Utilização
O principal objeto do jsoup é o Document, que representa um documento HTML.
import org.jsoup.nodes.Document;
@Path("http://www.google.com")
public interface Google {
@Path("/") @Get
Document home();
}
Last updated
Was this helpful?