Here you can find the source of getDoc(String url)
public static Document getDoc(String url)
//package com.java2s; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import java.io.IOException; public class Main { public static Document getDoc(String url) { try {//from w ww . j a v a 2 s . c o m Document document = Jsoup.connect(url).timeout(10000).get(); if (document == null) { document = Jsoup.connect(url).timeout(10000).get(); } return document; } catch (IOException e) { System.out.println("get document error," + e.getMessage()); } return null; } }