471,349 Members | 1,810 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,349 software developers and data experts.

basic web auth and verification

Trying to figure out how to add login verfication. I believe it is
logging me in, but theres no way to really tell..any ideas? or
tutorials out there that can exaplain this to me?


import urllib,urllib2,cookielib

passlst = open(passfile, 'r').readlines()
cj = cookielib.LWPCookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(c j))
TheForm = urllib.urlencode({"username":"myid","password":"my pas"})
request = urllib2.Request(url, TheForm)
result = urllib2.urlopen(request)

Oct 23 '07 #1
0 726

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Dan Stromberg | last post: by
7 posts views Thread by Michael Foord | last post: by
reply views Thread by _jpg_ | last post: by
4 posts views Thread by Barry | last post: by
3 posts views Thread by Old Man | last post: by
6 posts views Thread by Alejandro Dubrovsky | last post: by
6 posts views Thread by lb_mike | last post: by
8 posts views Thread by =?Utf-8?B?TFc=?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.