I'm having issues getting around websites that use http authentication, I have a list of sites which I do some scrapping on but some of these have http authentication on them. I'm not looking to get the content of those sites I want to be able to be able to determine if they are guarded by http auth and then move on. For example in the snippet below agent.get never return so it's impossible for me to handle it. How can I handle a case like this?
require 'mechanize'
agent = Mechanize.new
page = agent.get('http://freyalovesmusic.co.uk')