similar to: Mechanize::Agent#post_connect_hook response != Mechanize#parse response

Displaying 20 results from an estimated 900 matches similar to: "Mechanize::Agent#post_connect_hook response != Mechanize#parse response"

2007 Feb 26
1
some Mechanize objects never garbage collected?
Greetings, I''m using Mechanize to scrap dozens of pages and have noticed the size of my ruby process keeps growing. I set Mechanize.max_history to 0 with no effect on the memory use. I wrote a little test to show the objects left on the heap after mechanizing a single page and then doing a garbage collection. Sample list appended below. I can supply the test code if it helps.
2007 Oct 26
2
Post problems
Hello, I''m having trouble using mechanise to post a form. I took a wireshark capture of the form being submitted by firefox and by mechanise. In both there is an HTTP Post and then a ''continuation of non-http traffic'' packet. The obvious difference is that the firefox continuation packet has some http metadata (I don''t know the proper terminology) where the
2009 Jun 25
2
Bad Form?
Hi, This is my first post, I wanted to ask a quick question about "Bad Form" -- rather, am I doing something with Mechanise I shouldn''t be doing? Here''s the long and short of it - I am using Mechanize with Cucumber and RSpec to test a *ahem* Perl XML web service.. talk about technology soup, but I have it working quite well. I have an example project on GitHub that
2011 Nov 17
2
please suggest a web page automation tool
I''ve been trying to get a couple of web automation tools going today and having a hard time. Seems like everything I try is outdated and won''t run on my environment. Mechanize seemed like a good one but it doesn''t want to run: require ''rubygems'' require ''open-uri'' require ''mechanize'' agent = Mechanize.new
2012 Feb 16
3
Mechanize::ResponseCodeError: 500
> Excuse me if my issue is a little bit application-specific. I need > Mechanize to submit bunch of data from our server to an online reservation > system. The url is https://secure.mdausa.org/donate/ > It works in my browser however using mechanize following error appears: > > /Library/Ruby/Gems/1.8/gems/mechanize-2.0.1/lib/mechanize/http/agent.rb:241:in > `fetch'':
2007 Mar 25
5
mechanize 0.6.6 Released
mechanize version 0.6.6 has been released! http://mechanize.rubyforge.org/ 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: =
2008 Jan 16
3
settings headers in mechanize
hi, a potential mechanize user here. i''ve looked at the API but it''s not clear what capacity there is to arbitrarily set the headers - does mechanize allow for this? mechanize is clearly great for web browsing, but i also need to construct get and post requests from scratch. i''ve looked at net:http, libcurl, openuri, but mechanize seems simpler and more functional than
2008 Jan 15
1
Converting Watir script to Mechanize
I have a Watir script that I would like to convert to a Mechanize script. The watir code looks like this require ''watir'' include Watir def test ie = IE.new ie.goto(''http://cpref.gsm.com/inter.asp?r=8084'') ie.text_field(:name, ''inter_string'').set(''Potassium'') ie.button(:id, ''image1'').click
2010 Oct 20
2
Mechanize::ResponseCodeError: 500
Also, excuse me if my issue is a little bit application-specific. I need Mechanize to submit bunch of data from our server to an online reservation system. The url ishttp://hajres.iranair.com/haj/request.php" It works in my browser however, using mechanize following error appears: >> agent.get("http://hajres.iranair.com/haj/request.php") Net::HTTP::Get: /haj/request.php
2008 Mar 11
8
Mechanize#get vs Mechanize#fetch_page
So I found myself wanting to call Mechanize#get with a hash for arguments like this: WWW::Mechanize.new(''http://api.flickr.com/services/rest/'', {:method => ''flickr.auth.getFrob''... }) Granted, it looks like this isn''t supported but it led me to what looks like a bug. Namely that get calls fetch_page(abs_uri, request, cur_page, &block)
2008 Mar 10
2
Mechanize for multi-part form post
Hi, I''m interested in using Mechanize as a way around manual multipart form creation. But the API is really centered around the idea of a form built from a page. I''d love to see a syntax like: response = agent.post(''http://www.mydomain.com/upload'', :image => File.new(file), :title => "My image", :description => "an image
2007 Jul 12
1
WWW::Mechanize::Link.inspect needs some TLC
The problem: users trying to debug Mechanize apps with Komodo are finding the debugger times out once it''s loaded a web page. They don''t run into this in the ruby-debug debugger, or running in normal mode. The reason: Komodo''s debugger is graphical, which means that whenever it hits a breakpoint it automatically shows the contents of each local variable. It has a
2012 Sep 22
2
Mechanize and Thread-Safety Revisited
This post from Aaron Patterson back in 2009 seems to be pretty definite about how to use Mechanize in a thread-safe way, but I thought I would revisit the question because there are several posts on StackOverflow since then that would seem to contradict it (of course, I trust Aaron''s answer more than random answers on StackOverlfow, but just in case I thought I would confirm it). It is
2009 Sep 17
1
Load Error Using Mechanize Gem
Hi, I''m getting a "Could not open any of [xml2, xslt, exslt] (LoadError)" error when trying to run a simple Ruby program taken from the EXAMPLES.rdoc file of the Mechanize gem. The error is in this line of the Nokogiri module of libxml.rb: ffi_lib ''xml2'', ''xslt'', ''exslt'' Not sure if there are missing gems, and if so,
2011 Jan 18
2
how to get captcha image with mechanize ?
Hey, how to get captcha image with mechanize ? the image is not a static picture, it''s a stream, a text-model. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/mechanize-users/attachments/20110118/bf9a58ff/attachment.html>
2006 May 02
2
Mechanize and file_column
Hi all, Has anyone successfully used WWW::Mechanize with file_column? I''m trying to upload a bunch of images to a custom controller, and something''s going wrong with the parameter names. Using a noddy controller :create action that looks like this: def create render :text => params.inspect end I get this result from a manual upload from a form:
2007 Oct 07
1
How to store a Mechanize object in the database?
Hi, I am trying to save a Mechanize object in database (using a Rails Model). But the save operation throws a TypeError Considering that "agent" is an instance of a Rails Model and "user" is defined as a "text" type in the Model. irb(main):039:0> agent.user = WWW::Mechanize.new #<WWW::Mechanize:0xb71295f0 @follow_meta_refresh=false, @key=nil,
2007 Oct 24
3
Using Mechanize in Story Step Implementations
Hi, Thought this might be of interest story writers. The mechanize plugin seems to play nice with RSpec. The following mix of methods seems to work just fine. I especially like the helpers for populating forms. agent = WWW::Mechanize.new page = agent.get ''http://www.gmail.com'' page.should have_tag(''form'', :count => 1) form = page.forms.first form.email =
2010 Jun 17
6
Foreman / external_node.rb
Hello All, I''m trying to start using external nodes under foreman, and I''m running into some issues. I have the entries in puppet.conf: [main] external_nodes = /etc/puppet/external_node.rb node_terminus = exec The enternal_node.rb script is the one that came with foreman: #!/usr/bin/ruby # a simple script which fetches external nodes from Foreman # you
2010 Mar 24
2
Mechanize
Hi I am trying to submit an asp form using Mechanize. I have to parse this site in order to get the results http://www.vitranexpress.com/home/CombinedHome.aspx So for this I have to log in the site which I was successful using Mechanize. Once you logged in you have to select the Link "Rate Quoter". Again using mechanize I got the page that this link pointed to. There is a form which