HttpClient client = HttpClients.createDefault();
HttpGet get = new HttpGet("http://qichacha.com/search_hangye?industryCode=A&industryorder=0&p=1");
HttpResponse response = client.execute(get);
HttpEntity entity = response.getEntity();
InputStream is=entity.getContent();
String result=EntityUtils.toString(entity,"utf-8");
// getHref(result);
System.out.println(result);
网址1:http://qichacha.com/search_hangye?industryCode=A&industryorder=0&p=1
网址2:http://qichacha.com/search_hangye?industryCode=A&industryorder=0&p=2
为什么输入两个网址抓取的数据一样?求哪位大神指教,谢谢!
这个不是你的问题,是http://qichacha.com 这个网站的问题,你没看到这个链接下不管是第几页,显示的数据都是一样的么。
所以你抓出来的数据也是相同的。
你直接在浏览器中查看一下。
设置里 设置下全部 或者全部叠合
设置HttpGet 吗?如何设置啊?帮人帮到底,谢谢大神!