I\'m using C#, and I\'ve been struggling for a few days for grabbing the final rendered HTML from an URL.
I\'ve tried using several browser engines, Awesomium, WebBrows
What I do is roughly the following (using the WebBrowser WinForms control):
public static string GetDomSource(WebBrowser wb)
{
var dd = wb.Document.DomDocument as IHTMLDocument2;
return dd.body.parentElement.outerHTML;
}
(Though I don't know whether you already tried this or whether you are using WinForms at all).
To introduce the IHTMLDocument2
interface, I've add a reference to the "Microsoft.mshtml" assembly.