此为jsoup官网地址:https://jsoup.org/
从官网下载jar包后 导入eclipse
package cn.zsyy.spider;
import java.io.IOException;
import java.util.HashMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jsoup.Connection;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import cn.zsyy.db.Dao;
public class Article {
static String yyxwurl = "需要爬取的网站";
static String host = "网站根目录";
static void innit() throws IOException{
Document document = Jsoup.connect(yyxwurl).get();
}
static void getlistUrL(String nextUrl) throws IOException{
String url = nextUrl;
Document document = Jsoup.connect(url).get();
Element first = document.select(".next").first();
if (!first.equals("javascript:void(0);")) {
String