Skip to content

CLI tool to scrape the results of the students from the website

License

Notifications You must be signed in to change notification settings

Manish-M2018/MSRIT-Results-scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MSRIT-Results-scraper


Sample result of a student

Sample Result of a student

Note: The usn, name, cgpa, sgpa and grade fields are blurred in the pic for privacy reasons

Results scraper cli tool (results_cmd_tool.py)

A command line interface that is designed for automating the task of fetching the results of students from http://exam.msrit.edu/ and displaying it in a tabular format on the browser

Usage

Clone the repository to the local machine

git clone https://github.com/Manish-M2018/MSRIT-Results-scraper.git

Change directory

cd MSRIT-Results-scraper

Using the tool

python3 results_cmd_tool.py -y <year(yy)> -b <branch extension(XX)> -m <max range of USN> 

Arguments

 
-y <year(yy)> -b <branch extension(XX)> -m <max range of USN> 

Options

  -h, --help            show this help message and exit  
-y YEAR, --year=YEAR specify the last two digits of the year
-b BRANCH, --branch=BRANCH specify the branch extension
-m MAX, --max=MAX specify the max limit of USNs

Allowed branches for option -b or --branch

CS, EC, IS, ME, ML, CH, CV, EE, TI, EI, IM, AT, BT

Example usage
Let us take the example where we want to retrieve the results of the students from USN 1 to 10 in Computer Science (CS) branch who joined the college in the year 2018

python results_cmd_tool.py -y 18 -b CS -m 10

(OR)

python results_cmd_tool.py --year 18 --branch CS --max 10

Where can I view the results that were fetched?

  • The results that were fetched from the website is stored in a file called results.html in the same directory
  • Open the file results.html in order to view the results in a tabular format on the browser

Points to note

  • Make sure that the website is not down for maintenance before using the tool
  • Do not use the tool for disrupting the normal functioning of the website
  • The tool does not store the results anywhere online (results are fetched on the spot)
  • Make sure you have an active internet connection while using the tool
  • Some USNs in the range may not be available due to various reasons



Code for scraping the results of a single student (scraper.py)

This is a piece of code in Python to scrape the results of a single student of MSRIT.
Take a look at this new results feature in action on MSRIT Connect!

Replace "USN Goes Here" with your USN to fetch the result :)
All the best!