0

i wrote an java application with Jsoup. This app should read values from the html dom. When i test it on a website like google or facebook it works. But i want to read live data (every second new data) from my own local website. When i run my app on my website i get only "null". Because it is read the dom tree without the actually value.

What can i do? I hope i find help.

Codesnippet:

Document doc = null;
        
        try {

            doc = Jsoup.connect(192.168.xx.xx).get(); 
            
            System.out.println(doc.title()); //OUTPUT: Name of website
            
            System.out.println(doc.getElementById("GuiDataOverViewPowerHouseConsumption")); //OUTPUT: NULL

        } catch (IOException e) {

            System.out.println("Server is not online");

        }
    }

Dani
  • 11
  • 2
  • You should add an example of html which produces the error-situation. – Bert Verhees Aug 31 '20 at 11:22
  • 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) – Eritrean Aug 31 '20 at 11:26

0 Answers0