jeudi 28 avril 2016

Jsoup link selection

I am trying to get all the links inside the div class news column index here is the structure of the html:

enter image description here

And here what I have tried but actually it doesnt give me any result, I dont really know why :///

 Document doc = Jsoup.connect("http://ift.tt/pcJv1r").get();
            Elements els = doc.select("#body > div > div.news-column-index > ul");
            for(Element e : els)
            {
                System.out.println(e.attr("href"));
            }




Aucun commentaire:

Enregistrer un commentaire