Need Pattern For Logging Into A Website

Tim Daneliuk tundra at tundraware.com
Sat Jan 26 01:15:00 CET 2013


On 01/25/2013 01:18 PM, Michael Torrie wrote:
> On 01/25/2013 09:18 AM, Tim Daneliuk wrote:
>> On 01/25/2013 10:01 AM, Steve Petrie wrote:
>>> On Thursday, January 24, 2013 8:29:51 PM UTC-5, Tim Daneliuk
>>> wrote: The mechanize module
>>> (http://wwwsearch.sourceforge.net/mechanize/) might be a place to
>>> start.  I've done something similar with code like this:
>> Thanks.
>
> I've had good luck using urllib2 and a cookiejar.  Just post your login
> credentials against the login url, keep all the cookies and then make
> your other requests using that cookiejar.  Besides the Python standard
> library docs on urllib2 and cookielib, here's an article that gives an
> overview of how to use it:
>
> http://www.techchorus.net/using-cookie-jar-urllib2
>
> This technique has the advantage of not requiring anything outside of
> the standard library.
>

Does it handle self-signed SSL certs?

-- 
----------------------------------------------------------------------------
Tim Daneliuk     tundra at tundraware.com
PGP Key:         http://www.tundraware.com/PGP/




More information about the Python-list mailing list