samedi 29 septembre 2018

Jsoup: Can't extract img tag

I'm trying to extract the image source of a few ads but I don't understand what i'm doing wrong :( The html tag that i want to extract looks like this: enter image description here

Code:

Elements pageSearchImg = page2.select("a[id^=item] > div[class=placeholder] > div[class=overflow_image] > img");
        for (int m = 0; m < pageSearchImg.size(); m++) {
                String img = pageSearchImg.get(m).attr("src");
                System.out.println(img);
        }

I guess there might be something wrong with a tag?




Aucun commentaire:

Enregistrer un commentaire