curl-and-python

Re: pycurl and https logins

From: Thomas Hunger <hto_at_arcor.de>
Date: Mon, 24 Nov 2008 18:51:42 +0000

> Can pyCurl do all this? If so, can someone get me started? If
> not, do you know of any tool that does?

You could try a normal lookup and catch the authentication failed
error (401) to see whether you need a username/pwd. Then you can ask
for a username/pwd via normal python interaction and use the
following pseudo-code:

import pycurl

curl = pycurl.Curl()
curl.setopt(pycurl.USERPWD, 'name:pwd')
[...]
curl.perform()

recent versions of curl also have separate CURLOPT_PASSWORD and
CURLOPT_USERNAME options, but I don't know if pycurl has those yet.

I am not sure about the interactions with SSL.

Tom
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2008-11-24