I am trying to login to a secure website and I am having some difficulty 
understanding the process.  Here is what I have with my limited 
knowledge of the subject:

##Start Code##
#!/usr/bin/env 
python                                                                          
     

                                                                                
                    

import 
urllib                                                                          
             

import 
urllib2                                                                         
             

                                                                                
                    

# 
Main                                                                            
                  

params = 
urllib.urlencode({                                                              
           

    "user" : 
"username",                                                                     
          

    "pass" : 
"password"                                                                      
        

})                                                                              
                    

                                                                                
                    

req = urllib2.Request("https://web.site.com/default.aspx";, 
params)          
data = 
urllib2.urlopen(req)                                                            
             

                                                                                
                    

for line in 
data.readlines():                                                               
        

    print line
##End Code##

This just doesn't seem to work.  It just brings me back to a login screen.

If you can lend a hand it would be much appreciated.

-Tom


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to