You might like Python's mechanize library. It's helped me clean out all the curl aliases from my .bashrc.
John
On Thursday, January 31, 2013, Nathan Panike <nwp@xxxxxxxxxxx> wrote:
> I found a solution: > > Now I run curl -D curl-header -o reference.maps http://proxy.chtc.wisc.edu/SQUID/LMCG/nwp/reference185.maps
> grep -q 'HTTP/1\..\+ 200 OK' curl-header || exit 1 > > Is there any better way of doing this? > > On Thu, Jan 31, 2013 at 08:16:07PM -0600, Nathan Panike wrote: >> Any curl experts in htcondor-users?
>> >> I have the following: >> >> + curl -o reference.maps http://proxy.chtc.wisc.edu/SQUID/LMCG/nwp/reference185.maps
>> >> ^^^ This returns success, and yet: >> >> + /usr/bin/head reference.maps >> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" >> "http://www.w3.org/TR/html4/strict.dtd">
>> <html><head> >> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> >> <title>ERROR: The requested URL could not be retrieved</title>
>> <style type="text/css"><!-- >> /* >> Stylesheet for Squid Error pages >> Adapted from design by Free CSS Templates >> http://www.freecsstemplates.org
>> Released for free under a Creative Commons Attribution 2.5 License >> >> Now, I can run "curl -o reference.maps http://proxy.chtc.wisc.edu/SQUID/LMCG/nwp/reference185.maps"
>> and get the correct file, but it is failing on some execute node. >> >> What is the correct command line option to curl to correctly diagnose >> that the "requested URL could not be retrieved"?
> > Nathan Panike > _______________________________________________ > HTCondor-users mailing list > To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
> subject: Unsubscribe > You can also unsubscribe by visiting > https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users > > The archives can be found at:
> https://lists.cs.wisc.edu/archive/htcondor-users/ >