问题描述
试图捕获有关产品的信息和所有给我空值的内部元素。我将请求更改为异步,但仍然有没有加载信息的 html 页面。 Html 不完整。如何解决这个问题?
CloseableHttpAsyncclient client = HttpAsyncclients.createDefault();
client.start();
SimpleHttpRequest request = SimpleHttpRequests.get("http://flashdeals.aliexpress.com/en.htm");
Future<SimpleHttpResponse> future = client.execute(request,null);
SimpleHttpResponse response = future.get();
System.out.println(response.getCode());
String htmlCode = response.getBodyText();
Document doc = Jsoup.parse(htmlCode);
Elements rows = doc.select(".deals-list");
System.out.println(rows);
client.close();
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)