Created
November 14, 2010 02:05
-
-
Save mishudark/675837 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cookie_h = urllib2.HTTPCookieProcessor() | |
opener = urllib2.build_opener(cookie_h) | |
urllib2.install_opener(opener) | |
ua = 'Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.9.0.11)' | |
ua += ' Gecko/2009061118 Fedora/3.0.11-1.fc10 Firefox/3.0.11' | |
h = {"User-Agent": ua} | |
params = urllib.urlencode({"pass": password,"user" :username}) | |
r = urllib2.Request("http://escolares.utm.mx/alumnos.php", headers=h) | |
f = urllib2.urlopen(r,params) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment