繁体   English   中英

我正在使用jsoup从网站url中提取图像,但是我想首先加载页面是否有这样做的方法?

[英]I am using to jsoup to pull images from website url, but I want the page to load first is there anyway to do this?

问题是我尝试从中提取的某些URL具有尚未加载的javascript幻灯片容器。 我想在幻灯片中获取图像,但是由于尚未加载,因此无法捕获元素。 反正有这样做吗? 这就是我到目前为止

Document doc = Jsoup.connect("http://news.nationalgeographic.com/news/2013/03/pictures/130316-gastric-brooding-frog-animals-weird-science-extinction-tedx/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ng%2FNews%2FNews_Main+%28National+Geographic+News+-+Main%29").get();
Elements jpg = doc.select("img[src$=.jpg]");

jsoup无法处理javascript,但是您可以为此使用其他库:

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM