From peter at rubyrailways.com Sat Dec 6 21:11:38 2008 From: peter at rubyrailways.com (Peter Szinek) Date: Sun, 7 Dec 2008 03:11:38 +0100 Subject: [Mechanize-users] Construct a mechanize document from String Message-ID: <5906DD28-0223-4193-9ECB-86637648D13C@rubyrailways.com> Hey guys, This must be something dead easy but for the life of me I can't figure out how! Let's say I have a string: garbage = <<-SZ
1
2
3
SZ I'd like to construct a new document from it, something like my_string_doc = WWW::Mechanize.new.get(garbage) Any ideas? Cheers, Peter From martin at malditainternet.com Mon Dec 8 07:23:01 2008 From: martin at malditainternet.com (Martin Sarsale) Date: Mon, 8 Dec 2008 10:23:01 -0200 Subject: [Mechanize-users] Construct a mechanize document from String In-Reply-To: <5906DD28-0223-4193-9ECB-86637648D13C@rubyrailways.com> References: <5906DD28-0223-4193-9ECB-86637648D13C@rubyrailways.com> Message-ID: > I'd like to construct a new document from it, something like > > my_string_doc = WWW::Mechanize.new.get(garbage) I use this for feeding mechanize with my own forms WWW::Mechanize::Form.new(form); -- Martin Sarsale - martin at malditainternet.com From michael.c.libby at gmail.com Mon Dec 8 07:23:46 2008 From: michael.c.libby at gmail.com (Michael Libby) Date: Mon, 8 Dec 2008 06:23:46 -0600 Subject: [Mechanize-users] Construct a mechanize document from String In-Reply-To: <5906DD28-0223-4193-9ECB-86637648D13C@rubyrailways.com> References: <5906DD28-0223-4193-9ECB-86637648D13C@rubyrailways.com> Message-ID: On Sat, Dec 6, 2008 at 8:11 PM, Peter Szinek wrote: > Hey guys, > > This must be something dead easy but for the life of me I can't figure out > how! > > Let's say I have a string: > > garbage = <<-SZ > > > > > > >
1
2
3
> > > SZ > > I'd like to construct a new document from it, something like > > my_string_doc = WWW::Mechanize.new.get(garbage) > > Any ideas? page = WWW::Mechanize::Page.new(nil, {'content-type' => 'text/html'}, garbage) _________________ Michael C. Libby www.mikelibby.com From aaron at tenderlovemaking.com Mon Dec 29 23:05:03 2008 From: aaron at tenderlovemaking.com (Aaron Patterson) Date: Mon, 29 Dec 2008 20:05:03 -0800 Subject: [Mechanize-users] [ANN] mechanize 0.9.0 Released Message-ID: <20081230040503.GB43051@Jordan.local> mechanize version 0.9.0 has been released! * * 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: ### 0.9.0 * Deprecations * WWW::Mechanize::List is gone! * Mechanize uses Nokogiri as it's HTML parser but you may switch to Hpricot by using WWW::Mechanize.html_parser = Hpricot * Bug Fixes: * Nil check on page when base tag is used #23021 * * -- Aaron Patterson http://tenderlovemaking.com/