// 获取搜索出来的网页页数pageNum String pageNum = Jsoup.connect(urljd).ignoreContentType(true) .header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0)" + " Gecko/20100101 Firefox/33.0") .get().select("#J_topPage .fp-text i").get(0).text(); System.out.println("pageNum"+pageNum);