Hello to the list and thanks to Aaron for the cool software. I''ve been fooling around with Mechanize and Hpricot for a couple of days and from the docs I''ve read, the following code SHOULD work but doesn''t. I''ve tried the same code on a couple of different sites and I get the same exception for each. Any pointers or suggestions are appreciated. http://pastie.caboo.se/99216 -- Thank you, Shane Witbeck Digital Sanctum, inc. ----------------------------------------------------- skype: digitalsanctum blog: http://www.digitalsanctum.com
Hey Shane, On Thu, Sep 20, 2007 at 07:04:15PM -0400, Shane Witbeck wrote:> Hello to the list and thanks to Aaron for the cool software. > > I''ve been fooling around with Mechanize and Hpricot for a couple of > days and from the docs I''ve read, the following code SHOULD work but > doesn''t. I''ve tried the same code on a couple of different sites and I > get the same exception for each. Any pointers or suggestions are > appreciated. > > http://pastie.caboo.se/99216The problem is that you''re setting the values through hpricot, and not through mechanize. Mechanize doesn''t know to reparse the page after you''ve modified it. I actually think that is a cool way to use HPricot, and I''m going to support it automagically in the future. However, for now, you''ll need to tell the page to reparse the page. Here is you''re script with the lines I changed highlighted: http://pastie.caboo.se/99219 Hope that helps! -- Aaron Patterson http://tenderlovemaking.com/
Aaron, you tha man. Thanks for the 12 minute response time. Shane On 9/20/07, Aaron Patterson <aaron at tenderlovemaking.com> wrote:> Hey Shane, > > On Thu, Sep 20, 2007 at 07:04:15PM -0400, Shane Witbeck wrote: > > Hello to the list and thanks to Aaron for the cool software. > > > > I''ve been fooling around with Mechanize and Hpricot for a couple of > > days and from the docs I''ve read, the following code SHOULD work but > > doesn''t. I''ve tried the same code on a couple of different sites and I > > get the same exception for each. Any pointers or suggestions are > > appreciated. > > > > http://pastie.caboo.se/99216 > > The problem is that you''re setting the values through hpricot, and not > through mechanize. Mechanize doesn''t know to reparse the page after > you''ve modified it. I actually think that is a cool way to use HPricot, > and I''m going to support it automagically in the future. > > However, for now, you''ll need to tell the page to reparse the page. > > Here is you''re script with the lines I changed highlighted: > > http://pastie.caboo.se/99219 > > Hope that helps! > > -- > Aaron Patterson > http://tenderlovemaking.com/ > _______________________________________________ > Mechanize-users mailing list > Mechanize-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mechanize-users >-- Thank you, Shane Witbeck Digital Sanctum, inc. ----------------------------------------------------- skype: digitalsanctum blog: http://www.digitalsanctum.com
Could you provide the exception you are getting as well? Mike B. Quoting Shane Witbeck <shane at digitalsanctum.com>:> Hello to the list and thanks to Aaron for the cool software. > > I''ve been fooling around with Mechanize and Hpricot for a couple of > days and from the docs I''ve read, the following code SHOULD work but > doesn''t. I''ve tried the same code on a couple of different sites and I > get the same exception for each. Any pointers or suggestions are > appreciated. > > http://pastie.caboo.se/99216 > > -- > Thank you, > > Shane Witbeck > Digital Sanctum, inc. > ----------------------------------------------------- > skype: digitalsanctum > blog: http://www.digitalsanctum.com > _______________________________________________ > Mechanize-users mailing list > Mechanize-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mechanize-users >---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
Shane Witbeck wrote:> Aaron, you tha man. Thanks for the 12 minute response time.Yeah, open source is so lame; the response time is typically less than it takes me to find the customer support contact for a commercial vendor... Regards, -- Bil Kleb http://fun3d.larc.nasa.gov