sparklemotion/mechanize

Mechanize is a ruby library that makes automated web interaction easy.

4,440

stars

1,498

commits

Ruby

primary language

Aug 23, 2026

updated

www.rubydoc.info/gems/mechanize/
ruby
scraping
web

README

Mechanize

Test suite

Description

The Mechanize library is used for automating interaction with websites. Mechanize automatically stores and sends cookies, follows redirects, and can follow links and submit forms. Form fields can be populated and submitted. Mechanize also keeps track of the sites that you have visited as a history.

Dependencies

  • Ruby >= 2.6
  • Gems:
    • addressable
    • domain_name
    • http-cookie
    • mime-types
    • net-http-digest_auth
    • net-http-persistent
    • nokogiri
    • rubyntlm
    • webrick
    • webrobots

Support:

The bug tracker is available here:

Examples

If you are just starting, check out GUIDE.rdoc or EXAMPLES.rdoc.

Developers

Use bundler to install dependencies:

bundle install

Run all tests with:

bundle exec rake test

See also Mechanize::TestCase to read about the built-in testing infrastructure.

Security and Vulnerability Reporting

Please report vulnerabilities at https://github.com/sparklemotion/mechanize/security

See SECURITY.md for full information and description of our security policy.

Authors

  • Eric Hodel
  • Akinori MUSHA
  • Aaron Patterson
  • Lee Jarvis
  • Mike Dalessio

Acknowledgments

This library was heavily influenced by its namesake in the Perl world. A big thanks goes to Andy Lester, the author of the original Perl module WWW::Mechanize which is available here. Ruby Mechanize would not be around without you!

Thank you to Michael Neumann for starting the Ruby version. Thanks to everyone who's helped out in various ways. Finally, thank you to the people using this library!

License

This library is distributed under the MIT license. Please see LICENSE.txt.

Contributors

(top 30 of 109)

drbrain

491 commits

knu

229 commits

flavorjones

215 commits

tenderlove

194 commits

sparklemotion/mechanize

Mechanize is a ruby library that makes automated web interaction easy.

4,440

stars

1,498

commits

Ruby

primary language

Aug 23, 2026

updated

www.rubydoc.info/gems/mechanize/
ruby
scraping
web

README

Mechanize

Test suite

Description

The Mechanize library is used for automating interaction with websites. Mechanize automatically stores and sends cookies, follows redirects, and can follow links and submit forms. Form fields can be populated and submitted. Mechanize also keeps track of the sites that you have visited as a history.

Dependencies

  • Ruby >= 2.6
  • Gems:
    • addressable
    • domain_name
    • http-cookie
    • mime-types
    • net-http-digest_auth
    • net-http-persistent
    • nokogiri
    • rubyntlm
    • webrick
    • webrobots

Support:

The bug tracker is available here:

Examples

If you are just starting, check out GUIDE.rdoc or EXAMPLES.rdoc.

Developers

Use bundler to install dependencies:

bundle install

Run all tests with:

bundle exec rake test

See also Mechanize::TestCase to read about the built-in testing infrastructure.

Security and Vulnerability Reporting

Please report vulnerabilities at https://github.com/sparklemotion/mechanize/security

See SECURITY.md for full information and description of our security policy.

Authors

  • Eric Hodel
  • Akinori MUSHA
  • Aaron Patterson
  • Lee Jarvis
  • Mike Dalessio

Acknowledgments

This library was heavily influenced by its namesake in the Perl world. A big thanks goes to Andy Lester, the author of the original Perl module WWW::Mechanize which is available here. Ruby Mechanize would not be around without you!

Thank you to Michael Neumann for starting the Ruby version. Thanks to everyone who's helped out in various ways. Finally, thank you to the people using this library!

License

This library is distributed under the MIT license. Please see LICENSE.txt.

Contributors

(top 30 of 109)

drbrain

491 commits

knu

229 commits

flavorjones

215 commits

tenderlove

194 commits

Languages

Ruby

94.6%

HTML

5.4%