Tag: 动态内容

htmlagilitypack和动态内容问题

嗨,大家好。 我想创建一个web scrapper应用程序,我想用webbrowser控件,htmlagilitypack和xpath。 现在我设法创建xpath生成器(我使用webbrowser为此目的),这工作正常,但有时我不能动态(通过javascript或ajax)生成的内容。 另外我发现当webbrowser控件(实际上IE浏览器)生成一些额外的标签,如“tbody”,而htmlagilitypack`htmlWeb.Load(webBrowser.DocumentStream);`没有看到它。 另一个说明。 我发现以下代码实际上抓住了当前的网页源代码,但我无法提供htmlagilitypack`(mshtml.IHTMLDocument3)webBrowser.Document.DomDocument;` 你能帮帮我吗? 谢谢