Hey,
Submission using post method does not seem to work properly.
eg : for 'http://cbseresults.nic.in/class10/cbse10.htm' , the following
script is not giving proper output.
#!/usr/bin/python
import urllib,urllib2
url = 'http://cbseresults.nic.in/class10/cbse10.asp'
parameters = {'regno' : 'xxxxxxx'} # where xxxxxxx is a 7 digit
numerical roll number
data = urllib.urlencode(parameters)
request = urllib2.Request(url, data)
response = urllib2.urlopen(request)
page = response.read(200000)
print page
also for, http://results.vtu.ac.in/ the following script is not working
#!/usr/bin/python
import urllib,urllib2
url = 'http://results.vtu.ac.in/default.php'
parameters = {'rid' : '1hk09cs043'}
data = urllib.urlencode(parameters) # Use urllib to encode the parameters
request = urllib2.Request(url, data)
response = urllib2.urlopen(request) # This request is sent in HTTP POST
page = response.read(200000)
print page
Please enlighten me on this.
--
Cheers,
Anirudh Asokan
www.anirudh.info
_______________________________________________
BangPypers mailing list
[email protected]
http://mail.python.org/mailman/listinfo/bangpypers