[Tutor] Logging In To Forum
agent.krycek at gmail.com
Fri Aug 1 20:47:52 CEST 2008
I would like to have my script log in to a vBulletin forum. My script does
seem to do this (as I can check my control panel, etc.). But although I can
get access to my account, the forum fails to update the date when I last
visited. That date updates just fine when I do it manually through a
browser. I was wondering if I was maybe messing something up with cookies.
Any suggestions would be appreciated. Thanks!
# Logs into vBulletin forum
import urllib2, time
import cgitb; cgitb.enable()
print "Content-type: text/html\n"
url = "http://forums.x10hosting.com/login.php?do=login"
queryString = "..."
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor())
response = opener.open(url, queryString)
fileIn = open("../logfile.txt", "a")
*if* __name__ == "__main__":
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor