Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Software (http://www.velocityreviews.com/forums/f6-software.html)
-   -   Python http authentication (http://www.velocityreviews.com/forums/t744326-python-http-authentication.html)

Vort3x 02-28-2011 06:54 PM

Python http authentication
 
I am trying to log into a site so I can scrape it, but cant seem to get the login working. I have this so far, but I dont know what url/uri needs to be given, nor how to find it.

Code:

auth_handler = urllib.request.HTTPBasicAuthHandler()
auth_handler.add_password(realm='mail',uri='https://www.kalahari.net/profile/pipeline/signin.aspx?',user='myusername',passwd='mypass')
opener = urllib.request.build_opener(auth_handler)
   
# ...and install it globally so it can be used with urlopen.
urllib.request.install_opener(opener)
f=urllib.request.urlopen('https://www.kalahari.net/profile/pipeline/signin.aspx?')



All times are GMT. The time now is 06:44 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.