HTTPS Login


T

Tom Grove

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
 
Ad

Advertisements

Ad

Advertisements

G

Gerold Penz

Tom said:
I am trying to login to a secure website and I am having some difficulty
understanding the process.

Hi Tom!

This code should do what you want:
http://www.python-forum.de/post-18148.html#18148

Regards,
Gerold
:)

--
________________________________________________________________________
Gerold Penz - bcom - Programmierung
(e-mail address removed) | http://gerold.bcom.at | http://sw3.at
Ehrliche, herzliche Begeisterung ist einer der
wirksamsten Erfolgsfaktoren. Dale Carnegie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top