Does it matter what language/program the parser is?
|
Jsoup is very easy to get into, it's imo by far the best html parser for java.
You can simply get the src of all images of a webpage like this.
If you only want images inside a specific div, all you have to do is edit your doc.select() toCode:Document document = Jsoup.connect(YOUR_URL).get(); Elements images = doc.select("img"); for (Element element : images) { String src = element.attr("src"); System.out.println(src); }
Lemme know if you got it working!Code:doc.select("div.DIV_CLASS_NAME > img");
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |