mechanize version 0.6.5 has been released!

Posted by – March 15, 2007

The Mechanize library 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.

Changes:

= Mechanize CHANGELOG

== 0.6.5

* Copying headers to a hash to prevent memory leaks
* Speeding up page parsing
* Aliased fields to elements
* Adding If-Modified-Since header
* Added delete_field! to form. Thanks to Sava Chankov
* Updated uri escaping to support high order characters. Thanks to Henrik Nyh.
* Better handling relative URIs. Thanks to Henrik Nyh
* Now handles pipes in URLs

http://rubyforge.org/tracker/?func=detail&aid=7140&group_id=1453&atid=5709

* Now escaping html entities in form fields.

http://rubyforge.org/tracker/?func=detail&aid=7563&group_id=1453&atid=5709

* Added MSIE 7.0 user agent string

2 Comments on mechanize version 0.6.5 has been released!

Respond

  1. Luigi Rizzo says:

    Hello. Many thanks for your work on mechanize. I’m trying to scrape a web site and the page I’m trying to access requires a cookie to be set to be downloaded (I discovered this after some time, wondering why with firefox I could access it and not with mechanize). In any case I found the cookies which are needed but I started to fight with mechanize on how to use in such a circumstance. In other words (please, note I’m rather a ruby newbie) I’ve to access the page and provide a certain cookie value to have it properly downloaded. I was able to access and donwload it with curl (with the –cookie option) but I’ve not been able to do it with mechanize. I googled a lot but was not able to find a plain, simple utorial on how to use the cookie features of mechanize. How can I achive with mechanize what I do with curl (see below):

    systemcmd = “curl.exe\” -v –output \”rassegnaQuotidiana.asp\” –cookie persistent%2DRassegnaStampa=\”articleFormat=pdf\” –cookie RassegnaStampa=\”userSessionId=%7BE8CC32B6%2D49C7%2D41EE%2D9CEF%2D4F798706787F%7D&NomeTabella=Ecoras&strdaric3=&strdaric=+rsdat+%3D+DATE%27#{rassegnatime.year.tos}%2D#{rassegnatime.month.tos}%2D#{rassegnatime.day.tos}%27&tipo=11001&currentDate=#{rassegnatime.year.tos}%2D9%2D28&ricercaData=#{rassegnatime.year.tos}%2D#{rassegnatime.month.tos}%2D#{rassegnatime.day.tos}\” http://rassegna.camera.it/chiosconew/pagweb/rassegnaQuotidiana.asp”

    Many thanks in advance!

    Luigi

  2. makuchaku says:

    Hi,

    Is it possible to serialize the Mechanize object?
    I want to store the Mechanize object in a database using a rails Model but it throws a TypeError exception when doing so…

    Any idea how I can solve this problem?

    Thanks :)


    Maku

Respond

Comments

Comments