Can I use python code to login a website?

John Bell jbell at iinet.net.au
Wed Mar 27 03:31:01 EST 2002


newgene wrote:

> Hi, group,
>      
>      I am wondering if possible to use python code to login a website
> need username and password, like mail.yahoo.com. Another type of
> website is poping up a authorization box asking for username and
> password instead of a input form within the webpage.


It sure is!  The main modules you'll need to look at are httplib, urllib 
and urllib2.  However, web programming is a pretty big topic and it 
would probably be best to tackle it methodically.  Mark Lutz' "Python 
Programming" devotes several hundred pages to internet scripting. 
Somewhere on the web (I can't locate the reference at the moment) 
someone's putting together a Python text processing book.  Look in the 
mail list archives for details.  This also has a section on these 
topics, but from memory not yet written.


> 
> Thanks you in advance.
> 
> Newgene
> 




More information about the Python-list mailing list