Extract image src using JSoup

后端 未结 3 1736
無奈伤痛
無奈伤痛 2021-01-12 16:50

I am trying to extract all the image url\'s from this webpage using jsoup? Can anyone offer help on how to do it? All the tags are formatted like this, but I only need the s

3条回答
  •  遥遥无期
    2021-01-12 17:06

    Supposing you already have the Element according to this IMG, try this:

    String source = img.attr("src");

    This attr method is inherited from Node class

    HTH

提交回复
热议问题