I want to search through a html file and then get the url to an image on that page. This url should then be saved as a string - thats all. The problem is I really don t know
Okay this did the job :) I am getting the image url now:
public class jSoupEx {
private static final String elements = null;
public static void main(String args[]){
try {
Document doc = Jsoup.connect("http://***/index.php/Datei:***.jpg").get();
Element image = doc.select("img").first();
String url = image.absUrl("src");
System.out.println(url);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}