find all images on website android
private static Set<String> findImages(String url) throws IOException {
Set<String> links = new HashSet<>();
Document doc = Jsoup.connect(url)
.data("query", "Java")
.userAgent("Mozilla")
.cookie("auth", "token")
.timeout(3000)
.get();
Elements elements = doc.select("img[src]");
for (Element element : elements) {
links.add(element.attr("src"));
}
return links;
}