Displaying 20 results from an estimated 500 matches similar to: "Basic_auth questions"
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 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 Jul 13
2
How do you handle pop ups?
When I click a link to download a file, a pop up window comes up to save the
file. Is there a way to enter a file name and click the submit button with
mechanize?
Thanks,
Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mechanize-users/attachments/20070712/558f7018/attachment.html
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 Aug 06
3
authentication question
Hi all
Is there another gem to "manage" logins beyound Equipment (basic
login/security) to use under Camping?
I have already readed the basic_auth.rb and security.rb but is there
some app I can see it working as an example?!
Thanks in advance
Francisco
PS: keep the great job with Camping :)
2007 Nov 12
3
Weird error downloading a gzip''ed file
Hi all,
I''ve been using mechanize for a while and it rocks. Docs are pretty clear
and so far I''ve been able to do it on my own.
However, I''m stuck in a weird situation in a script to download my contact
list from hotmail.
I''ve used Firebug to check all urls, and tested it by hand while logged in
via browser.
Even in the script everything works well until the
2010 Jul 08
4
testing authentication with basic_auth
hi, I''ve got an api which is using
authenticate_or_request_with_http_basic
What are you guys using to test this? I''m using rspec, and before I
was using rspec-rails, I was using authorize from Rack::Test to do the
authentication. However, authorize clearly doesn''t work when using
rspec-rails, so I''m wondering what everyone else is doing?
--
You received this
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:
=
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 Aug 21
7
Signin to LinkedIn
Hi,
Does anyone have the formula for getting logged into LinkedIn?
Here''s my current attempt:
require ''rubygems''
require ''mechanize''
agent = WWW::Mechanize.new
home_page = agent.get(''http://www.linkedin.com'')
signin_page = agent.click home_page.links.text(''Sign in'')
puts "\nSIGNIN PAGE"
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
2007 Apr 03
2
Scraping and saving.
Hi,
I''m working to scrape and save some ebooks. Mechanize has been
wonderful so far. The link I''m having trouble with is this one.
http://www.webscription.net/SendZip.aspx?SKU=0671578499&ProductID=379&format=H
When I click that in the browser it saves it to a file named
H_1632.zip. How do I get that name from the page. I suspect to save
this to a file I would just do
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 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 Jan 04
5
Help accessing http headers?
Hi,
I''m using Mechanize, and I''ve developed a lot of code around it. I''d like
to be able to check the Etag header during a get to see if the page has
changed, as well as some other http header information. Can I do that
without hacking Mechanize myself?
Does anyone have any examples of how to do this?
William
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 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
2007 Dec 10
3
Road to 0.7.0
Hey everyone,
I''ve been refactoring Mechanize for an 0.7.0 release. Basically I''m
trying to clean the code up and there are a few features that I think
are unnecessary, but I would like to ask people first.
1) REXML as a parser.
I want to remove support for REXML. I don''t use it. Hpricot seems to
do everything I need.
2) 1.8.2 thru 1.8.4 support
2009 Apr 22
5
Connection reset by peer (Errno::ECONNRESET)
Hi,
I''m a new bee to Ruby and I''m trying to parse the html content from a
website using net/http. All urls work fine except for
"https://www.google.com/accounts/AuthSubRequest?scope=http%3A%2%2Fwww.google.com%2Fcalendar%2Ffeeds%2F&session=0&secure=0&next=http%3A%2F%2Fwww.google.com".
When I try to access this url I get an error like this :
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)