def vtu_results(): url = "http://result.vtu.ac.in/cbcs_results2016.aspx" col = 0 i = 1 w = 1 for Z in ['EI', 'CV', 'EE', 'EC', 'IS', 'CS', 'ME']: for e in range(1, 200): student = requests.get(url + str("?usn=1rn15") + Z + str(getthreedigit.digit(e)) + str("&sem=2")).text soup = BeautifulSoup(student, "html.parser") print(Z + str(getthreedigit.digit(e)), end=" ") for rows in soup.findAll('tr'): for columns in soup.findAll('td'): for columns in soup.findAll('input', {"id": ("txtCP" + str(i))}): if (w == 1): print((columns['value']), end=" ") elif (w == 2): print((columns['value']), end=" ") elif (w == 3): print((columns['value']), end=" ") elif (w == 4): print((columns['value']), end=" ") elif (w == 5): print((columns['value']), end=" ") elif (w == 6): print((columns['value']), end=" ") elif (w == 7): print((columns['value']), end=" ") col = col + int(columns['value']) w += 1 i += 1 if (i > 7): break break w = 1 i = 1 print(str(col), end=" ") P = col / 24.00 SGPA = ("%0.2f" % P) print(str(SGPA), end=" ") names = soup.findAll("input", {"name": "txtName"}) for n in names: print(n['value']) col = 0
def vtu_results(): url = "http://result.vtu.ac.in/cbcs_results2016.aspx" col = 0 i = 1 w = 1 for Z in ['ME', 'IS', 'CS']: for e in range(80, 200): student = requests.get(url + str("?usn=1rn15") + Z + str(getthreedigit.digit(e)) + str("&sem=2")).text soup = BeautifulSoup(student, "html.parser") print("USN:1RN15" + Z + str(getthreedigit.digit(e))) names = soup.findAll("input", {"name": "txtName"}) for n in names: print(n['value']) for rows in soup.findAll('tr'): for columns in soup.findAll('td'): for columns in soup.findAll('input', {"id": ("txtCP" + str(i))}): if (w == 1): print("Mathematics:" + columns['value']) elif (w == 2): print("Chemistry:" + columns['value']) elif (w == 3): print("PCD:" + columns['value']) elif (w == 4): print("CAED:" + columns['value']) elif (w == 5): print("Electronics:" + columns['value']) elif (w == 6): print("Comp Programming Lab:" + columns['value']) elif (w == 7): print("Chemistry Lab:" + columns['value']) col = col + int(columns['value']) w += 1 i += 1 if (i > 7): break w = 1 i = 1 print("Total Credits Earned=" + str(col)) P = col / 24.00 SGPA = ("%0.2f" % P) print("SGPA:" + str(SGPA) + "\n\n") col = 0
def vtu_results(): url = "http://result.vtu.ac.in/cbcs_results2016.aspx" col = 0 i = 1 w = 1 for e in range(1, 56): student = requests.get(url + str("?usn=1rn15ei") + str(getthreedigit.digit(e)) + str("&sem=2")).text soup = BeautifulSoup(student, "html.parser") print("USN:1RN15EI" + str(getthreedigit.digit(e))) names = soup.findAll("input", {"name": "txtName"}) for n in names: print(n['value']) for rows in soup.findAll('tr'): for columns in soup.findAll('td'): for columns in soup.findAll('input', {"id": ("txtCP" + str(i))}): if (w == 1): print("Mathematics:" + columns['value']) elif (w == 2): print("Physics:" + columns['value']) elif (w == 3): print("Civil:" + columns['value']) elif (w == 4): print("EME:" + columns['value']) elif (w == 5): print("Electricals:" + columns['value']) elif (w == 6): print("Workshop:" + columns['value']) elif (w == 7): print("Physics Lab:" + columns['value']) col = col + int(columns['value']) w += 1 i += 1 if (i > 7): break w = 1 i = 1 print("Total Credits Earned=" + str(col) + "\n\n") col = 0
def vtu_results(): url = "http://result.vtu.ac.in/cbcs_results2016.aspx" col = 0 i = 1 w = 1 for e in range(1, 127): student = requests.get(url + str("?usn=1rn15is") + str(getthreedigit.digit(e)) + str("&sem=2")).text soup = BeautifulSoup(student, "html.parser") print("USN:1RN15IS" + str(getthreedigit.digit(e))) for rows in soup.findAll('tr'): for columns in soup.findAll('td'): for columns in soup.findAll('input', {"id": ("txtCP" + str(i))}): if (w == 1): print("Mathematics=" + columns['value']) elif (w == 2): print("Chemistry=" + columns['value']) elif (w == 3): print("PCD=" + columns['value']) elif (w == 4): print("CAED=" + columns['value']) elif (w == 5): print("Electonics=" + columns['value']) elif (w == 6): print("Compputer Programming Lab=" + columns['value']) elif (w == 7): print("Chemistry Lab=" + columns['value']) col = col + int(columns['value']) w += 1 i += 1 if (i > 7): break w = 1 i = 1 print("Total Credits Earned=" + str(col) + "\n\n") col = 0
def vtu_results(): url="http://results.vtu.ac.in/results/result_page.php" #"http://result.vtu.ac.in/cbcs_results2016.aspx" col=0 i=1 w=1 flag=1 '''1am14is062''' for yy in ['EE', 'CS', 'IS', 'ME', 'EI', 'EC', 'CV']: for e in range(1,200): if (yy==('EE'or'EI') and e==56)or(yy==('CS'or'IS') and e==127)or(yy=='ME' and e==171)or(yy=='EC'and e==177)or(yy=='CV' and e==65): break student = requests.get("http://results.vtu.ac.in/results/result_page.php?usn=1rn13is087").text #url+str("?usn=1rn13")+yy+str(getthreedigit.digit(e))+str("&sem=7")).text soup = BeautifulSoup(student, "html.parser") namec = soup.findAll("input", {"name": "txtName"}) for n in namec: print(n['value']) print("USN:1RN15"+yy + str(getthreedigit.digit(e))) for rows in soup.findAll('tr'): for columns in soup.findAll('td'): for columns in soup.findAll('input', {"id": ("txtCP"+ str(i))}): if (w==1): namez = soup.findAll("input",{"id":"txtSub"+str(w)}) for l in namez: print(l['value'],end=" :" ) print (columns['value']) elif (w==2): namez = soup.findAll("input", {"id": "txtSub" + str(w)}) for l in namez: print(l['value'], end=" :") print(columns['value']) elif (w==3): namez = soup.findAll("input", {"id": "txtSub" + str(w)}) for l in namez: print(l['value'], end=" :") print(columns['value']) elif(w==4): namez = soup.findAll("input", {"id": "txtSub" + str(w)}) for l in namez: print(l['value'], end=" :") print(columns['value']) elif(w==5): namez = soup.findAll("input", {"id": "txtSub" + str(w)}) for l in namez: print(l['value'], end=" :") print(columns['value']) elif(w==6): namez = soup.findAll("input", {"id": "txtSub" + str(w)}) for l in namez: print(l['value'], end=" :") print(columns['value']) elif(w==7): namez = soup.findAll("input", {"id": "txtSub" + str(w)}) for l in namez: print(l['value'], end=" :") print(columns['value']) col= col + int(columns['value']) w+=1 i+=1 if (i>7): break break w=1 i=1 print("Total Credits Earned :" + str(col) + "\n\n") col = 0
def vtu_results(): url="http://result.vtu.ac.in/cbcs_results2016.aspx" col=0 i=1 w=1 flag=1 for yy in [ 'CS','IS','ME','EC','EE','EI','CV']: for e in range(1,200): if (yy==('EE'or'EI') and e==56)or(yy==('CS'or'IS') and e==127)or(yy=='ME' and e==171)or(yy=='EC'and e==177)or(yy=='CV' and e==65): break student = requests.get(url+str("?usn=1rn15")+yy+str(getthreedigit.digit(e))+str("&sem=2")).text soup = BeautifulSoup(student, "html.parser") namec = soup.findAll("input", {"name": "txtName"}) for n in namec: name=(n['value']) print(name.ljust(25,' '),end="") usn=("1RN15"+yy + str(getthreedigit.digit(e))) print(usn.center(15," "),end='') for rows in soup.findAll('tr'): for columns in soup.findAll('td'): for columns in soup.findAll('input', {"id": ("txtCP"+ str(i))}): if (w==1): strrr=columns['value'] print(strrr.center(4,' '),end="") elif (w==2): strrr = columns['value'] print(strrr.center(4, ' '), end="") elif (w==3): strrr = columns['value'] print(strrr.center(4, ' '), end="") elif(w==4): strrr = columns['value'] print(strrr.center(4, ' '), end="") elif(w==5): strrr = columns['value'] print(strrr.center(4, ' '), end="") elif(w==6): strrr = columns['value'] print(strrr.center(4, ' '), end="") elif(w==7): strrr = columns['value'] print(strrr.center(4, ' '), end="") col= col + int(columns['value']) w+=1 i+=1 if (i>7): break break w=1 i=1 maze= (col/24) strr=("GPA:" +str("%0.2f"%maze) ) print(strr.center(10,' ')) col = 0
resultBang = open('resultbang.txt', 'a') checkCountStu = 0 #file = open(college+dept,'a') #wb = xlwt.Workbook() #ws = wb.add_sheet('one') row = 1 numbOfSubjects = 0 excelfileheader = False for e in range(1,250): numb = e col = 0 row += 1 while True: try: data= { 'usn': str(college)+'17'+str(dept)+str(getthreedigit.digit(numb)) } url = "http://results.vtu.ac.in/vitaviresultcbcs/resultpage.php" #print(data,college) source_code = requests.post(url,data=data).text #print(source_code) soup = BeautifulSoup(source_code,"html.parser") checkCount = 0 subNumbInTable = 2 #formula 1+(n-1)6 b = 0 for sub in soup.findAll('div', {'class': 'divTableCell'}): subNumb = 1 + (subNumbInTable-1)*6 b += 1 if b is subNumb: subNumbInTable += 1 if (sub.text not in hashingSubjectsToNumb.keys()) and (sub.text != str('P -> PASS')):
def vtu_results(): url = "http://results.vtu.ac.in/cbcs_17/result_page.php" #"http://result.vtu.ac.in/cbcs_results2017.aspx" #"http://result.vtu.ac.in/cbcs_results2016.aspx" col = 0 i = 1 w = 1 flag = 1 '''1am14is062''' for yy in ['ME']: #,'EE', 'ME', 'EI', 'EC', 'CV']: col = 0 for e in range(1, 200): col = 0 '''if ((yy==('CS'or'IS') )):#and e==127)or yy==('EE'or'EI') and e==56)or(yy=='ME' and e==171)or(yy=='EC'and e==177)or(yy=='CV' and e==65): break''' student = requests.get(url + str("?usn=1rn16") + yy + str(getthreedigit.digit(e)) + str("&sem=1")).text soup = BeautifulSoup(student, "html.parser") namec = soup.findAll("input", {"name": "txtName"}) for n in namec: print(n['value']) print("USN:1RN16" + yy + str(getthreedigit.digit(e))) for rows in soup.findAll('tr'): for columns in soup.findAll('td'): for columns in soup.findAll('input', {"id": ("txtCP" + str(i))}): if (w == 1): namez = soup.findAll("input", {"id": "txtSub" + str(w)}) for l in namez: print(l['value'], end=" :") a = columns['value'] print(a) elif (w == 2): namez = soup.findAll("input", {"id": "txtSub" + str(w)}) for l in namez: print(l['value'], end=" :") a = columns['value'] print(a) elif (w == 3): namez = soup.findAll("input", {"id": "txtSub" + str(w)}) for l in namez: print(l['value'], end=" :") a = columns['value'] print(a) elif (w == 4): namez = soup.findAll("input", {"id": "txtSub" + str(w)}) for l in namez: print(l['value'], end=" :") a = columns['value'] print(a) elif (w == 5): namez = soup.findAll("input", {"id": "txtSub" + str(w)}) for l in namez: print(l['value'], end=" :") a = columns['value'] print(a) elif (w == 6): namez = soup.findAll("input", {"id": "txtSub" + str(w)}) for l in namez: print(l['value'], end=" :") a = columns['value'] print(a) elif (w == 7): namez = soup.findAll("input", {"id": "txtSub" + str(w)}) for l in namez: print(l['value'], end=" :") a = columns['value'] print(a) elif (w == 8): namez = soup.findAll("input", {"id": "txtSub" + str(w)}) for l in namez: print(l['value'], end=":") a = columns['value'] print(a) col = col + int(a) #int(columns['value']) a = 0 w += 1 i += 1 if (i > 8): break break w = 1 i = 1 cred = str(col) print("Total Credits Earned :" + cred) sgpa = (float(cred) / 240.000) * 10.00 print("SGPA----------------------------------------" + "%.2f" % sgpa + "\n\n") #round( String(cred/280),2)) col = 0
checkCountStu = 0 file = open(college + dept, 'a') row = 1 numbOfSubjects = 0 excelfileheader = False for e in range(400, 450): numb = e col = 0 row += 1 while True: try: data = { 'lns': str(college) + '16' + str(dept) + str(getthreedigit.digit(numb)), 'token': 'bHFKSWRvQ2MyWGtuT2hmS1pWbDNvMVNVdTBxOFN1aGJrck5JMGRJampUanFkaEtLYmRlN0c0ME5FdUFnM0RhVzNsZStLU2J5TjM4dFJxcE1EbXl6Q0E9PTo6+8nqZWm4ShQ8dP0Ll6M2MQ==', 'current_url': 'http://results.vtu.ac.in/vitaviresultcbcs2018/index.php' } source_code = requests.post(url, data=data).text #print(source_code) soup = BeautifulSoup(source_code, "html.parser") checkCount = 0 subNumbInTable = 2 #formula 1+(n-1)6 b = 0 for sub in soup.findAll('div', {'class': 'divTableCell'}): subNumb = 1 + (subNumbInTable - 1) * 6 b += 1