I'm trying to retrieve html content from some webpage. The problem I'm having is that in the webpage, there's a javascript function that generates additional html elements that I'm not getting (because the content I'm downloading is not rendered). Is there anyway to download the html, render the javascript and only afterwards - get the html content?
Asked
Active
Viewed 262 times
1
-
you basically have to recreate a browser, and perform the same actions that a normal browser would, then access the generated DOM. – Marc B Apr 02 '14 at 15:09
-
@MarcB Right. Is there any simple way to do that? Perhaps opening a browser and request the html content from it after it has finished rendering? – Shmoopy Apr 02 '14 at 15:12
2 Answers
0
Check out this post (Get the final generated html source using c# or vb.net), which mentions using WebKit.NET (http://sourceforge.net/projects/webkitdotnet/ ) or Open Web Kit Sharp https://code.google.com/p/open-webkit-sharp/
0
I have used the extension "Web Developer" for Firefox to get the generated HTML. Open the webpage then click View Source button then View Generated source. That will open the source with all the generated HTML. You can then copy it and do what you wish.

Auzi
- 337
- 3
- 13