The Mechanize module is used for automating interaction with websites. Mechanize automatically stores and sends cookies, follows redirects, 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.
cookiejar >= 1.3.0 libxmljs >= 0.8.1 request >= 2.21.1 mime >= 1.2.9
This borrows heavily from Aaron Patterson's mechanize Ruby gem.