0

I want to know if the DOM that I get from Jsoup

Document doc = Jsoup.connect(page.getPageUrl()).get();

Will it be same as the DOM I get from the browser (just after loading)? In other words, if there are any DOM manipulation done by the javascript during onload() method, will it happen before the dom is returned by Jsoup ?

Girish
  • 1,981
  • 3
  • 17
  • 18
  • 1
    http://stackoverflow.com/a/12631861. What you're wanting is a [headless browser](http://blog.arhg.net/2009/10/what-is-headless-browser.html), which Jsoup doesn't appear to be. – Jonathan Lonowski Apr 05 '13 at 00:05

1 Answers1

2

It would be the same as the Http Response's body, which is not manipulated by javascript.

A simple fact: Jsoup does not have any javascript engine to execute the script, so it basically can't do that.

semekh
  • 3,867
  • 2
  • 24
  • 34