0

I want to pull the four data I marked in the table in the picture and the following data with jsoup. But I couldn't find which HTML codes to use.

enter image description here

Here is my code and website

https://www.ilan.gov.tr/ilan/kategori/9/ihale-duyurulari

        Document doc = Jsoup.connect("https://www.ilan.gov.tr/ilan/kategori/9/ihale-duyurulari").get();
                
    //System.out.println(doc.outerHtml());
    for(Element row: doc.select("search-results-content row ng-tns-c146-3")) {
        
        final String title = row.select(".list-desc ng-tns-c152-3").text();
        final String title1 = row.select(".col col-4 col-lg-4 col-border ng-star-inserted").text();
        
        System.out.println(title);      
    }
  • 3
    It looks like that page is generated dynamically via JavaScript. Jsoup is not browser emulator so it doesn't have support for JS. More info: [Page content is loaded with JavaScript and Jsoup doesn't see it](https://stackoverflow.com/q/7488872), [Jsoup Java HTML parser : Executing Javascript events](https://stackoverflow.com/q/7344258) – Pshemo Sep 22 '22 at 13:45
  • 2
    it seems webpage is using AJAX to handle dynamic content. Use Network tab on your devtools to inspect AJAX requests queried by JavaScript. For the webpage you requested, It is accessing: https://www.ilan.gov.tr/api/api/services/app/Ad/AdsByFilter with POST Method with Payload `{"keys":{"txv":[9]},"skipCount":0,"maxResultCount":12}` – Alex Park Sep 22 '22 at 13:59
  • @AlexPark I think that your comment answers the question, so you can post it as an answer. – TDG Sep 23 '22 at 07:27
  • Does this answer your question? [Page content is loaded with JavaScript and Jsoup doesn't see it](https://stackoverflow.com/questions/7488872/page-content-is-loaded-with-javascript-and-jsoup-doesnt-see-it) – Janez Kuhar Sep 27 '22 at 22:45

0 Answers0