Why Html Source Is Different When I Opened It From Web Browser And Read It In Java?
I have a question about parsering online html page. when I open html source from a web browser, I can see the data in there. But when I read this html page from java. I can not re
Solution 1:
Probably the page has some JavaScript code that is executed by the browser and loads more data to the page, after the HTML has been loaded. Reading only the HTML with Java does not execute the JavaScript, hence additional data is not visible in the stream.
Edit: A library like HtmlUnit may help in solving the common problem of loading Ajaxified Html pages to a certain degree: http://htmlunit.sourceforge.net/
Post a Comment for "Why Html Source Is Different When I Opened It From Web Browser And Read It In Java?"