//每个网站设置了5s的速度
public class Test4 {
public static void main(String[] args) throws Exception{
//设置url
String url = "https://ssr4.scrape.center/page/1";
Test4 t = new Test4();
System.out.println(t.parseJsoup(url));
}
public String parseJsoup(String url) throws IOException {
Document document = Jsoup.connect(url)
.timeout(10*1000)//设置超时等待10s
.get();
return document.html();
}
}
Java爬虫:Scrape Center的ssr4
最新推荐文章于 2024-11-03 11:01:20 发布