Stateful programmatic web browsing, based on Python-Mechanize, which is based on Andy Lester’s Perl module WWW::Mechanize.
NuGet Package Name | Description | Version | Download Count |
---|---|---|---|
Mechanize.NET | Stateful programmatic web browsing, based on Python-Mechanize, which is based on Andy Lester’s Perl module WWW::Mechanize. | ||
Mechanize.NET.AngleSharp | AngleSharp IHtmlParser Extension for Mechanize.NET |
By default, MechanizeBrowser
uses HtmlAgilityPack as the Html Parser. To use other Parsers, such as AngleSharp, change your instantiation to:
using (var browser = new MechanizeBrowser(new AngleSharpParser()))
{
}
using (var browser = new MechanizeBrowser())
{
var page = await browser.NavigateAsync("https://www.google.com/");
if (page.IsHtml)
{
var form = page.Forms["f"];
var queryfield = form.FindControl<ScalarControl>("q");
queryfield.Value = "Mechanize.NET";
var newpage = await form.SubmitForm();
var contents = newpage.Document;
// Collect the Results from contents.
}
}
Language | Creators | Name |
---|---|---|
Perl | Andy Lester | WWW::Mechanize |
Python | Kovid Goyal | Python-Mechanize |
Ruby | SparkleMotion | Mechanize |
Java | GistLabs | Mechanize for Java |
C# | William Bradley | Mechanize.NET |