0

I am trying to get the source code of a page with Jsoup, but I face a problem. Many elements are missing. When I press Ctrl-U to see the source code of the page, the elements are missing there too, but when I mark an element and inspect it with firefox, all the elements are there.

How can I get those hidden elements with Jsoup?

dirac
  • 309
  • 1
  • 9
  • What HTML code do you see when you turn off Java Script support in your browser? – Pshemo Jan 29 '16 at 00:20
  • I doesn't generate the code. – dirac Jan 29 '16 at 00:25
  • So as you see this code is generated dynamically by JavaScript. But jsoup is simply HTML parser, not browser emulator and it doesn't support JavaScript. You may want to use other tools like Selenium webdriver or maybe http://htmlunit.sourceforge.net/ – Pshemo Jan 29 '16 at 00:29
  • Thanks, that was very helpful. – dirac Jan 29 '16 at 00:37

0 Answers0