On Thu, Dec 23 2010, Anirudh Asokan wrote:

[...]

> #!/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

I haven't tried with the first but with the above, the backend
processes the POST only if the "submit" parameter is specified (the
value is apparently irrelevant). 

curl -d rid=1hk09cs043 -d submit=SUBMIT http://results.vtu.ac.in/default.php | 
grep -i roshan 

will work but

curl -d rid=1hk09cs043 -d http://results.vtu.ac.in/default.php | grep -i roshan 

will not. 


-- 
_______________________________________________
BangPypers mailing list
[email protected]
http://mail.python.org/mailman/listinfo/bangpypers

Reply via email to