如何从这个HTML页面中的DIV类特定标签? [英] How to get a specific tag from a div class with this html page?
本文介绍了如何从这个HTML页面中的DIV类特定标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从这个 html页面检索图像URL中一>
图片是网页上的版本盒内。我将如何去得到它使用JSoup选择方法。
如
文档DOC = Jsoup.connect(URL)获得();
元PNG = doc.select(//什么标签呢?);
我对如何设置它的想法,只是没有如何检索标记。
解决方案
doc.select(div.box艺术),选择(IMG)ATTR(ABS:SRC));
I am trying to retrieve the image url in from this html page
The image is inside of the editions box on the webpage. How would i go about getting it using the JSoup selector method.
Such as
Document doc = Jsoup.connect(url).get();
Element png = doc.select(//What would the tag be?);
I have an idea of how to set it up, just not how to retrieve the tag.
解决方案
doc.select("div.box-art").select("img").attr("abs:src"));
这篇关于如何从这个HTML页面中的DIV类特定标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文