sudo apt install tesseract-ocr
pip install beautifulsoup4
pip install opencv-python
pip install pytesseract
pip install unidecode
pip install numpy
>>> r = Result()
>>> r.check_student("2020BITE001")
{'status': True, 'result': True}
>>> r.check_student("2020NITSGR0413")
{'status': True, 'result': True}
>>> r.check_student("2020BITE999")
{'status': True, 'result': False}
>>> r.check_student("2020NITSGR9999")
{'status': True, 'result': False}
>>> r.get_semesters("2020BITE001")
{'status': True, 'result': [('1', 'FIRST SEMESTER'), ('2', 'SECOND SEMESTER'), ('3', 'THIRD SEMESTER'), ('4', 'FOURTH SEMESTER')]}
>>> r.get_semesters("2020NITSGR0413")
{'status': True, 'result': [('1', 'FIRST SEMESTER'), ('2', 'SECOND SEMESTER'), ('3', 'THIRD SEMESTER'), ('4', 'FOURTH SEMESTER')]}
>>> r.get_semesters("2020BITE999")
{'status': True, 'message': 'Student does not exist!'}
>>> r.get_semesters("2020NITSGR9999")
{'status': True, 'message': 'Student does not exist!'}
>>> r.get_result("2020BITE001", 1)
{'status': True, 'result': {'Session': 'AUTUMN 2020', 'Name': 'JAMEEL KAISAR KHAN', 'Enrollment': '2020BITE001', 'Semester': 'FIRST SEMESTER', 'Degree': 'B.TECH', 'Branch': 'ITE', 'Publish Date': '12/05/2022', 'Semester Credits': '25', 'Semester Grade Points': '225', 'SGPA': '9.00', 'Cumulative Credits': '25', 'Cumulative Grade Points': '225', 'CGPA': '-', 'Result': 'PASS', 'Subjects': [{'Code': 'CHL101', 'Name': 'Chemistry Laboratory', 'Grade': 'A', 'Credits': '1'}, {'Code': 'CHT101', 'Name': 'Engineering Chemistry', 'Grade': 'B+', 'Credits': '4'}, {'Code': 'CVT101', 'Name': 'Engineering Drawing', 'Grade': 'A', 'Credits': '4'}, {'Code': 'EEL101', 'Name': 'Basic Electrical Engineering Laboratory', 'Grade': 'A', 'Credits': '1'}, {'Code': 'EET101', 'Name': 'Basic Electrical Engineering', 'Grade': 'A+', 'Credits': '4'}, {'Code': 'HST101', 'Name': 'Basic English and Communication Skills', 'Grade': 'A+', 'Credits': '3'}, {'Code': 'ITL101', 'Name': 'Computer Programming Laboratory', 'Grade': 'A', 'Credits': '1'}, {'Code': 'ITT101', 'Name': 'Computer Programming', 'Grade': 'B+', 'Credits': '3'}, {'Code': 'MAT101', 'Name': 'Mathematics I', 'Grade': 'A', 'Credits': '4'}]}}
>>> r.get_result("2020NITSGR0413", "2")
{'status': True, 'result': {'Session': 'SPRING 2021', 'Name': 'JAMEEL KAISAR KHAN', 'Enrollment': '2020BITE001', 'Semester': 'SECOND SEMESTER', 'Degree': 'B.TECH', 'Branch': 'ITE', 'Publish Date': '31/05/2022', 'Semester Credits': '25', 'Semester Grade Points': '224', 'SGPA': '8.96', 'Cumulative Credits': '50', 'Cumulative Grade Points': '449', 'CGPA': '8.980', 'Result': 'PASS', 'Subjects': [{'Code': 'CHT102', 'Name': 'Environmental Studies', 'Grade': 'A', 'Credits': '3'}, {'Code': 'CVT102', 'Name': 'Engineering Mechanics', 'Grade': 'A+', 'Credits': '4'}, {'Code': 'HSL101', 'Name': 'Language Laboratory', 'Grade': 'A+', 'Credits': '1'}, {'Code': 'HST102', 'Name': 'Advanced English Comm. Skills & Organizational Behavior', 'Grade': 'A+', 'Credits': '3'}, {'Code': 'MAT102', 'Name': 'Mathematics II', 'Grade': 'B+', 'Credits': '4'}, {'Code': 'MET101', 'Name': 'Elements of Mechanical Engg.', 'Grade': 'B+', 'Credits': '3'}, {'Code': 'PHL101', 'Name': 'Physics Laboratory', 'Grade': 'A', 'Credits': '1'}, {'Code': 'PHT101', 'Name': 'Engineering Physics', 'Grade': 'A', 'Credits': '4'}, {'Code': 'WSL101', 'Name': 'Work shop Practice', 'Grade': 'B+', 'Credits': '2'}]}}
>>> r.get_result("2020BITE001", 8)
{'status': True, 'message': 'Invalid semester or result not published yet!'}
>>> r.get_result("2020NITSGR9999", 10)
{'status': True, 'message': 'Student does not exist!'}
>>> r.get_result("2020BITE999", 1)
{'status': True, 'message': 'Student does not exist!'}
>>> r.get_result("2020NITSGR9999", 1)
{'status': True, 'message': 'Student does not exist!'}
>>> r = Result()
You can set a custom limit to the number of concurrent threads. Default max_threads
value is 5.
>>> r = Result(max_threads=10)
>>> r.check_student_bulk(["2020BITE001", "2020NITSGR0413", "2020BITE999", "2020NITSGR9999"])
[{'status': True, 'result': True}, {'status': True, 'result': True}, {'status': True, 'result': False}, {'status': True, 'result': False}]
>>> r.get_semesters_bulk(["2020BITE001", "2020NITSGR0413", "2020BITE999", "2020NITSGR9999"])
[{'status': True, 'result': [('1', 'FIRST SEMESTER'), ('2', 'SECOND SEMESTER'), ('3', 'THIRD SEMESTER'), ('4', 'FOURTH SEMESTER')]}, {'status': True, 'result': [('1', 'FIRST SEMESTER'), ('2', 'SECOND SEMESTER'), ('3', 'THIRD SEMESTER'), ('4', 'FOURTH SEMESTER')]}, {'status': True, 'message': 'Student does not exist!'}, {'status': True, 'message': 'Student does not exist!'}]
>>> r.get_result_bulk([("2020BITE001", 1), ("2020NITSGR0413", "2"), ("2020BITE001", 8), ("2020NITSGR9999", 10), ("2020BITE999", 1), ("2020NITSGR9999", 1)])
[{'status': True, 'result': {'Session': 'AUTUMN 2020', 'Name': 'JAMEEL KAISAR KHAN', 'Enrollment': '2020BITE001', 'Semester': 'FIRST SEMESTER', 'Degree': 'B.TECH', 'Branch': 'ITE', 'Publish Date': '12/05/2022', 'Semester Credits': '25', 'Semester Grade Points': '225', 'SGPA': '9.00', 'Cumulative Credits': '25', 'Cumulative Grade Points': '225', 'CGPA': '-', 'Result': 'PASS', 'Subjects': [{'Code': 'CHL101', 'Name': 'Chemistry Laboratory', 'Grade': 'A', 'Credits': '1'}, {'Code': 'CHT101', 'Name': 'Engineering Chemistry', 'Grade': 'B+', 'Credits': '4'}, {'Code': 'CVT101', 'Name': 'Engineering Drawing', 'Grade': 'A', 'Credits': '4'}, {'Code': 'EEL101', 'Name': 'Basic Electrical Engineering Laboratory', 'Grade': 'A', 'Credits': '1'}, {'Code': 'EET101', 'Name': 'Basic Electrical Engineering', 'Grade': 'A+', 'Credits': '4'}, {'Code': 'HST101', 'Name': 'Basic English and Communication Skills', 'Grade': 'A+', 'Credits': '3'}, {'Code': 'ITL101', 'Name': 'Computer Programming Laboratory', 'Grade': 'A', 'Credits': '1'}, {'Code': 'ITT101', 'Name': 'Computer Programming', 'Grade': 'B+', 'Credits': '3'}, {'Code': 'MAT101', 'Name': 'Mathematics I', 'Grade': 'A', 'Credits': '4'}]}}, {'status': True, 'result': {'Session': 'SPRING 2021', 'Name': 'JAMEEL KAISAR KHAN', 'Enrollment': '2020BITE001', 'Semester': 'SECOND SEMESTER', 'Degree': 'B.TECH', 'Branch': 'ITE', 'Publish Date': '26/09/2022', 'Semester Credits': '25', 'Semester Grade Points': '224', 'SGPA': '8.96', 'Cumulative Credits': '50', 'Cumulative Grade Points': '449', 'CGPA': '8.980', 'Result': 'PASS', 'Subjects': [{'Code': 'CHT102', 'Name': 'Environmental Studies', 'Grade': 'A', 'Credits': '3'}, {'Code': 'CVT102', 'Name': 'Engineering Mechanics', 'Grade': 'A+', 'Credits': '4'}, {'Code': 'HSL101', 'Name': 'Language Laboratory', 'Grade': 'A+', 'Credits': '1'}, {'Code': 'HST102', 'Name': 'Advanced English Comm. Skills & Organizational Behavior', 'Grade': 'A+', 'Credits': '3'}, {'Code': 'MAT102', 'Name': 'Mathematics II', 'Grade': 'B+', 'Credits': '4'}, {'Code': 'MET101', 'Name': 'Elements of Mechanical Engg.', 'Grade': 'B+', 'Credits': '3'}, {'Code': 'PHL101', 'Name': 'Physics Laboratory', 'Grade': 'A', 'Credits': '1'}, {'Code': 'PHT101', 'Name': 'Engineering Physics', 'Grade': 'A', 'Credits': '4'}, {'Code': 'WSL101', 'Name': 'Work shop Practice', 'Grade': 'B+', 'Credits': '2'}]}}, {'status': True, 'message': 'Invalid semester or result not published yet!'}, {'status': True, 'message': 'Student does not exist!'}, {'status': True, 'message': 'Student does not exist!'}, {'status': True, 'message': 'Student does not exist!'}]
Sometimes you may get the following output.
>>> r.get_result("2020BITE001", 1)
{'status': False, 'message': "Couldn't crack captcha, please retry!"}
This happens when the script is unable to crack the captcha. You may try again or increase the number of tries after which the script gives up cracking captcha. Default max_tries
value is 10.
>>> r = Result(max_tries=15)
DO NOT MISUSE THIS SCRIPT