Any help is welcome... if someone is willing to help me through it via msn is AWESOME (already know C,C++,PHP and a couple more).
[Python] Neopets prog source code
#1
Posted 14 February 2010 - 03:07 PM
Any help is welcome... if someone is willing to help me through it via msn is AWESOME (already know C,C++,PHP and a couple more).
#2
Posted 14 February 2010 - 03:24 PM
import urllib
import urllib2
import cookielib
cookieJar = cookielib.LWPCookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookieJar))
opener.addheaders = [('User-agent', "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20061201 Firefox/2.0.0.4 (Ubuntu-feisty)")]
url = "http://www.neopets.c...om/login.phtml"
request = urllib2.Request(url, "username=usernamehere&password=passwordhere")
page = opener.open(request)
contents = page.read()
if "logout" in contents:
print "logged in"
raw_input("checking finished: ")
Credits to jimmy legend
That's a pretty simple neopets login. I'm not sure the programmers will share with you much more then that.
#3
Posted 14 February 2010 - 03:57 PM
Edited by huevoquilmes, 14 February 2010 - 03:57 PM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users