similar to: Mechanize for multi-part form post

Displaying 20 results from an estimated 10000 matches similar to: "Mechanize for multi-part form post"

2006 Sep 26
7
Interesting mechanize difficulty
I found an interesting page today that I was trying to script against. The server returns a 404 with content and the page just works normally in firefox despite the 404. Mechanize raises an exception on it though. I''m working on a test case now.
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 Nov 02
5
Adding fields to a form
Is there a decent way to add a field to a form before posting it? I haven''t tried using HPricot manipulations just yet, since I can''t ever find really solid docs on hpricot.... Form#[]= doesn''t work because it first searches only pre-existing fields. I''m investigating how to write a patch now. But I thought maybe someone here might have an idea.
2007 Jul 24
3
Jruby + Rhino = Javascript support?
Hey Aaron, I''m just thinking out loud here, but have you considered the possibility of using the Rhino [1] library to implement javascript support in mechanize? It''d create a jruby dependency for that feature, but still. Just thought I''d bring it up while I was thinking about it. -Mat [1] http://www.mozilla.org/rhino/
2007 Jul 02
6
Basic auth bug in 0.6.9
I haven''t spent the time to get a proper test case for this yet, but there appears to be a bug in the basic_auth code for mechanize 0.6.9. I''ve attached a CSV (from Charles) that illustrates the problem. Basically when running with basic_auth, there''s a failed request that''s followed up by a successful request. That last POST is a agent.submit(form)
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.
2008 Mar 15
4
[PATCH] Get requests with non-html referers
Hey, Aaron. Looks like that get with hash params patch you checked in had some side effects. Specifically, you''re testing if a referer is a Page (mechanize.rb:171), but the referer could also be a WWW::Mechanize::File. Like if the last page loaded was xml. Here''s a patch that addresses the issue. Thanks again, Mat -------------- next part -------------- A non-text
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
2006 Sep 18
2
BUG: Possible issue with escaped hrefs
I noticed an interesting problem today when scripting against a web app. The application contained a link in it that used %20 instead of spaces. After running mechanize through the Charles debugging proxy I found that mechanize was converting %20 to %2520 (double escaping the %20). This appears to happen under both 0.5.4 and 0.6.0. Here''s a simple set of files that demonstrate
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.
2007 Jul 28
3
problem with a form
Hello I am trying to fill in a form using WWW::Mechanize. I can fill in 2 of the 3 fields but one is giving me a problem. The name of this field is "name" when I use the following bit of code, it seems to change the name of the form, not the value of the field. The part of original page after pretty printing {forms #<WWW::Mechanize::Form {name "wp_pers_form"}
2007 May 23
4
Error when posting form
Trying to submit a form is resulting in the following error: >> page = agent.submit(f, f.buttons.first) query: "action=start&quick=Y&clientApp=0&clientID=MCO" Net::HTTP::Post: /dealerApply/controller.jsp using cookie: JSESSIONID=GJ4NCvGJDTlrvrKsLw17hZ3FnlXFdVkvB5hh1jLkHKcH4Tn27371!-538794652 request-header: accept-language => en-us,en;q0.5 request-header: connection
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?
2007 Jul 23
4
Design ideas
I''m trying to use mechanize against a site that has four fields in the form. However, those four fields have to be filled in order. So putting something in field one, populates the second field drop down. So I''m thinking that I''ll probably have to call the page multiple times? What sort of things should I be doing to figure out how to interact with this page.
2008 Apr 29
6
Intercepting an onClick file download
Hi, I''m having some trouble downloading a .csv file from a particular website. The file isn''t part of a url, you need to click on a link in order to get the file sent. I don''t know how to get mechanize to correctly identify that. Here is the link to the file I''m trying to retrieve: <td style="vertical-align: bottom; text-align: center;">
2007 May 12
3
Setting form-values
Hi, I''ve recently had some trouble setting form values in my code - for example: require ''rubygems'' require ''mechanize'' def save(pagename, content, editsummary = '''') agent = WWW::Mechanize.new agent.user_agent = ''Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)'' page =
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 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 Jul 12
3
Basic_auth questions
How do you make get the page when using basic_auth? Below is code, I am getting a 401 error. I am not sure if the basic _auth comes before the agent.get. I will appreciate any help. require ''mechanize'' require ''logger'' agent = WWW::Mechanize.new {|a| a.log = Logger.new(STDERR) } page = agent.get(''https://brewx.qualcomm.com/developer'' )