How to access a web site with an authentication template.

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Wed Mar 17 23:39:45 CET 2010


En Wed, 17 Mar 2010 15:43:00 -0300, Anthra Norell  
<anthra.norell at bluewin.ch> escribió:

> I understand that I can access password protected sites with urllib2. 
> [...] a site I am dealing with, because the opening page does not  
> require a password. It presents an id/password entry template and I have  
> no clue how to respond in python. The page source is chock full of java  
> script.

Use an HTTP sniffer (there are plenty) to see the actual request that is  
sent to the server. Then emulate it using urllib2.

-- 
Gabriel Genellina




More information about the Python-list mailing list