search for: fetch_pag

Displaying 12 results from an estimated 12 matches for "fetch_pag".

Did you mean: fetch_page
2008 Mar 11
8
Mechanize#get vs Mechanize#fetch_page
...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) [mechanize.rb:167]. But the method signature for fetch_page [mechanize.rb:441] is def fetch_page(uri, request, cur_page=current_page(), request_data=[]). What was the intention for the &block on Mechanize#get? I can''t find any example...
2007 Nov 12
3
Weird error downloading a gzip''ed file
...c850b8 URL: http://by124w.bay124.mail.live.com/mail/TodayLight.aspx?&n=1573603203&gs=true > "http://by124w.bay124.mail.live.com/mail/GetContacts.aspx" Err: unexpected end of file Trace: /usr/lib/ruby/1.8/mechanize.rb:372:in `read'' /usr/lib/ruby/1.8/mechanize.rb:372:in `fetch_page'' /usr/lib/ruby/1.8/net/http.rb:1050:in `request'' /usr/lib/ruby/1.8/net/http.rb:2133:in `reading_body'' /usr/lib/ruby/1.8/net/http.rb:1049:in `request'' /usr/lib/ruby/1.8/mechanize.rb:345:in `fetch_page'' /usr/lib/ruby/1.8/net/http.rb:543:in `start''...
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 Oct 05
3
basic_auth problem since 0.6.9
I have a site that I don''t think "returns" a basic_auth request, but is able to use basic_auth. In the past on 0.6.8, I could use the following code: require ''rubygems'' # gem ''mechanize'', ''=0.6.8'' require ''mechanize'' agent = WWW::Mechanize.new agent.basic_auth("username", "password")
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 Jun 12
1
setting request headers via get()
...ETag and If-Modified-Since. I''ve got a branch up on github with a (fairly invasive, though totally backwards-compatible) patch to allow headers to be passed in through the get() call: http://github.com/mdalessio/mechanize/commit/e7784de8326d2e4313dd4b2c2521a58b3ad52da3 Note that get(), fetch_page() and set_headers() all now have the ability to accept a hash of arguments as a parameter, allowing us to "stuff" extra parameters into each one while maintaining backwards compatibility (see tests). Special headers specified by :etag and :if_modified_since are recognized, for whatever...
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 Oct 06
0
can you mechanize.get('http://www.sephora.com/browse/product.jhtml?id=P230234') without error?
...ruby/gems/1.9.1/gems/mechanize-0.9.2/lib/www/mechanize/chain/pre_connect_hook.rb:14:in `handle'' from /usr/local/lib/ruby/gems/1.9.1/gems/mechanize-0.9.2/lib/www/mechanize/chain.rb:25:in `handle'' from /usr/local/lib/ruby/gems/1.9.1/gems/mechanize-0.9.2/lib/www/mechanize.rb:506:in `fetch_page'' from /usr/local/lib/ruby/gems/1.9.1/gems/mechanize-0.9.2/lib/www/mechanize.rb:234:in `get'' from del.rb:15:in `<main>'' and line 32 on response_header_handler.rb is: if page.is_a?(Page) && page.body =~ /Set-Cookie/n i am on ruby 1.9 and mechanize-0.9.2 o...
2007 Sep 14
1
Unable to scrap gmail.com - EOFError: End of file reached
...; from /usr/lib/ruby/1.8/net/http.rb:2017:in `read_status_line'' from /usr/lib/ruby/1.8/net/http.rb:2006:in `read_new'' from /usr/lib/ruby/1.8/net/http.rb:1047:in `request'' from /var/lib/gems/1.8/gems/mechanize-0.6.10/lib/mechanize.rb:514:in `fetch_page'' from /var/lib/gems/1.8/gems/mechanize-0.6.10/lib/mechanize.rb:428:in `post_form'' from /var/lib/gems/1.8/gems/mechanize-0.6.10/lib/mechanize.rb:247:in `submit'' from (irb):10 from :0 irb(main):011:0> When I do a submit on the form, I ge...
2007 Sep 11
3
Production mode bug with ruby/amazon
Hi all, I''ve got an issue that only ever appears in production mode. I''ve got my app hooked up to amazon''s web service (ECS, using ruby/amazon from http://www.caliban.org/ruby/ruby-amazon.shtml). In the dev environment, everything''s peachy. But in production mode, after I''ve left the app up for a couple of hours (sometimes, minutes), I get an
2007 Dec 06
0
Too many open files leads to timeout exceptions in Mechanize/Net::HTTP?
...n `readline'' > /usr/lib/ruby/1.8/net/http.rb:2029:in `read_status_line'' > /usr/lib/ruby/1.8/net/http.rb:2018:in `read_new'' > /usr/lib/ruby/1.8/net/http.rb:1059:in `request'' > /usr/lib/ruby/gems/1.8/gems/mechanize-0.6.10/lib/mechanize.rb:514:in > `fetch_page'' > /usr/lib/ruby/gems/1.8/gems/mechanize-0.6.10/lib/mechanize.rb:185:in > `get'' > /www/CLIENT/htdocs/include/script/nysif_scrape/lib/AuthedAgent.rb: > 18:in `initialize'' > /usr/lib/ruby/1.8/singleton.rb:95:in `new'' > /usr/lib/ruby/1.8/single...
2007 May 23
4
Error when posting form
...ruby/1.8/net/http.rb:1536:in `send_request_with_body'' from /usr/local/lib/ruby/1.8/net/http.rb:1522:in `exec'' from /usr/local/lib/ruby/1.8/net/http.rb:1045:in `request'' from /usr/local/lib/ruby/gems/1.8/gems/mechanize-0.6.8/lib/mechanize.rb:443:in `fetch_page'' from /usr/local/lib/ruby/gems/1.8/gems/mechanize-0.6.8/lib/mechanize.rb:357:in `post_form'' from /usr/local/lib/ruby/gems/1.8/gems/mechanize-0.6.8/lib/mechanize.rb:234:in `submit'' from (irb):28 from :0 I''d be happy to provide any...