C# library similar to HtmlUnit

后端 未结 5 679
一向
一向 2021-01-07 05:39

I need to write standalone application which will \"browse\" external resource. Is there lib in C# which automatically handles cookies and supports JavaScript (through JS is

相关标签:
5条回答
  • 2021-01-07 06:03

    http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.aspx Try you WebBrowser class and work with DOM there

    0 讨论(0)
  • 2021-01-07 06:08

    Look at Data Extracting SDK, which allows to post data via HtmlProcessor class. Also you can add your work item here if it is missed in the library.

    0 讨论(0)
  • 2021-01-07 06:08

    Selenium, it uses the actual browsers, but is a cross browser platform. Depends on wether or not you can have an actual browser running - it works by injecting javascript via a proxy into the browser. http://seleniumhq.org/support/

    0 讨论(0)
  • 2021-01-07 06:15

    The HtmlAgilityPack is specifically for parsing HTML. You can use the WebRequest class in the .NET Framework to handle communication and cookies.

    See my blog entry on Web scraping in .NET. This won't answer all your questions, but will get you part of the way there.

    0 讨论(0)
  • 2021-01-07 06:17

    If you're interested in writing your own version of htmlunit for C#, the IKVM project may be of help. http://www.ikvm.net/

    0 讨论(0)
提交回复
热议问题