similar to: submit button param is duplicated when a form is submitted a second time

Displaying 20 results from an estimated 1100 matches similar to: "submit button param is duplicated when a form is submitted a second time"

2010 Sep 01
4
NoMethodError: undefined method `force_encoding' for "Conten
Hi everyone! Im trying to install mechanizer from http://github.com/tenderlove/mechanize. I`ve clone the project into /tmp folder. When I do rake inside the folder /tmp/mechanizer it gives me this error: mac159180:mechanize renatosis$ rake (in /private/tmp/mechanize) /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -w -Ilib:bin:test:. -e ''require "rubygems";
2010 Jun 03
3
issue submitting a form
Hi. Recently I started rebuilding my old Mechanize script, which I used to automatically log in to a certain site and retrieve files from it. Old version worked great, however, when I did the update it started complaining. Here''s the log of the error: /Users/lukastolyarov/.gem/ruby/1.8/gems/mechanize-1.0.0/lib/mechanize/form/field.rb:30:in `<=>'': undefined method
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)
2006 Aug 07
1
mailing list''s unsubscribe doesn''t work?
Hi, I tried to unsubscribe through the mailing list web interface, but I''m not receiving the email to confirm my request. Is there any problem with the list''s web interface? May I unsubscribe through email? how? Thanks in advance. xavi
2009 Sep 25
0
WWW::Mechanize and Rails console not playing well
I can run this code just fine in irb, but when I run it in rails script/console, I get an error: >> res = agent.submit(search_form, search_form.buttons.first) ArgumentError: one hash required from /home/jwoods/NetBeansProjects/activista/vendor/rails/ actionmailer/lib/../../actionpack/lib/../../activesupport/lib/ active_support/core_ext/string/interpolation.rb:85:in `%''
2006 Oct 17
6
form submit debugging
version 0.62 I''ve got a form that''s giving me trouble (server reports invalid session ID). Unfortunately, the form is submitted using SSL so I can''t use a sniffer to see the differences between the ruby mechanize version and the perl mechanize version that is working. Is there a way to change the form action within mechanize? Or a way to display the request headers?
2008 Nov 03
2
Multiple Submit Buttons
Hello. I have run into a new form that contains multiple submit buttons. Currently my code for working with forms looks just like this example. require ''rubygems'' require ''mechanize'' a = WWW::Mechanize.new { |agent| agent.user_agent_alias = ''Mac Safari'' } a.get(''http://google.com/'') do |page|
2008 Jul 10
1
custom http headers in form.submit / upload without original form
Heyas :) I''m wondering how do I do to send my custom HTTP headers when posting a form. agent.set_headers is a private method and I don''t know how to get a reference to HTTPHeaders to use add_field and such. Since my request is a form, I''m sending it using agent.submit(form). Any hints? Bonus question: I would like to upload a file to a REST webservice, but I
2007 May 06
1
How to submit this form?
Hey all, maybe I am missing the obvious again, but I can not submit the form on buy.com: require ''rubygems'' require ''mechanize'' agent = WWW::Mechanize.new agent.user_agent_alias = ''Mac Safari'' page = agent.get("http://www.buy.com") search_form = page.forms.with.name("searchbox").first p search_form.buttons the last
2007 Sep 20
4
issues submitting a search form
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.
2007 Mar 20
6
bad URI problem when submitting a form
Hi all, I''ve a problem when submitting a form : the URL seems to be invalid. I really don''t see the way I should try to solve that problem. I searched on the web, but didn''t found any kind of that problem. Here is the code : require ''mechanize'' agent = WWW::Mechanize.new page =
2007 Mar 18
1
Submitting a form sends a file. How do I save it?
I''ve been using Mechanize for a project that i''ve been working on, but this is the first time i''m having to use forms (scraping previously). So, after i fill out the form, when I hit submit, it sends me information in the form of a text file to download. For the life of me, I can''t see how to get access to it. When clicking on a link, you can put a
2010 Jan 08
7
input form fields not in the #<WWW::Mechanize::Form array
Hi This may be a dumb question with an obvious answer. It would seem that an input form field identified with an ''id'' qualifier and not with a ''name'' qualifier is not recognised by Mechanize - at least it isn''t in the form field list. Is there any way of getting at these elements or am I, as I suspect, fresh out of luck. But you never know ...
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
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 Feb 07
15
https with certificates
I poked around the web a little and didn''t run across how to use https when it asks for certificate validation. I''m trying to connect to devices that don''t have valid certificates, and in this case, I don''t care if they are or not. So when I use my browser to ge to the site, firefox asks me to allow the certificate, then one other question, then I get the
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
2010 Jan 25
4
Does Amazon.com blocks scraping?
Hi there Does anyone know if Amazon.com has any sort of server side script that tries to block scraping activities? I first noticed that if I didn?t change the agent alias, it would fetch a page exactly like the normal one, but without the intial search field(maybe a silly way to prevent scraping). Then after it, I changed to some other alias, and submit a search. I got the result page as
2007 Jan 27
7
Getting elements from a web page
I am new to Mechanize and was wondering if there was a built-in method to get the elements that are on the page that are not part of a form. A couple of examples would be my banking site lists my entries and I want them to go into an array so that I can handle them. Or another site I use, does some categorization for me and I would like to manipulate it and present it differently to a user.