Jsoup: how to get an image's absolute url?

后端 未结 4 1635
难免孤独
难免孤独 2020-12-01 02:42

Is there a way in jsoup to extract an image absolute url, much like one can get a link\'s absolute url?

Consider the following image element found in http://ww

4条回答
  •  星月不相逢
    2020-12-01 03:30

    It might be inside a div class so the code would be like this (as example only)

    System.out.println(doc.select("div.ClassName image").attr(src));
    

提交回复
热议问题