Stateful programmatic web browsing.
Stateful programmatic web browsing, after Andy Lester’s Perl module WWW::Mechanize.
mechanize.Browser implements the urllib2.OpenerDirector interface. Browser objects have state, including navigation history, HTML form state, cookies, etc. The set of features and URL schemes handled by Browser objects is configurable. The library also provides an API that is mostly compatible with urllib2: your urllib2 program will likely still work if you replace “urllib2” with “mechanize” everywhere.
Features include: ftp:, http: and file: URL schemes, browser history, hyperlink and HTML form support, HTTP cookies, HTTP-EQUIV and Refresh, Referer [sic] header, robots.txt, redirections, proxies, and Basic and Digest HTTP authentication.
Much of the code originally derived from Perl code by Gisle Aas (libwww-perl), Johnny Lee (MSIE Cookie support) and last but not least Andy Lester (WWW::Mechanize). urllib2 was written by Jeremy Hylton.
Release history Release notifications
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size & hash||File type||Python version||Upload date|
|mechanize-0.4.3-py2.py3-none-any.whl (108.0 kB) View hashes||Wheel||py2.py3|
|mechanize-0.4.3.tar.gz (212.4 kB) View hashes||Source||None|
Hashes for mechanize-0.4.3-py2.py3-none-any.whl