<div dir="ltr">Hello,<br><br>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!<br>
<br>#!/usr/bin/python<br># forumlogin.py<br># Logs into vBulletin forum<br><br>import urllib2, time<br>import cgitb; cgitb.enable()<br><br>def main():<br> print "Content-type: text/html\n"<br>
<br> url = "<a href="http://forums.x10hosting.com/login.php?do=login">http://forums.x10hosting.com/login.php?do=login</a>"<br>
queryString =
"..."<br><br> opener = urllib2.build_opener(urllib2.HTTPCookieProcessor())<br> response = opener.open(url, queryString)<br> logfile()<br> response.close()<br><br>def logfile():<br> fileIn = open("../logfile.txt", "a")<br>
fileIn.write("\n")<br> fileIn.write(time.ctime())<br> fileIn.close()<br><br><i>if</i> __name__ == "__main__":<br> main()<br></div>