This is a cli application to download result of a student from the official NIT Hamirpur result website. Results are downloaded quite fast. 🚀
This project uses python3.7+, aiohttp.
See your result at https://nithp.herokuapp.com/result/.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Please make sure that python version >= 3.7.
Open the terminal and run the following commands:
- Clone the repository
$ git clone https://github.com/rohithill/nith_result_cli.git
$ cd nith_result_cli
- Create the virtual environment and install dependencies
$ python3 -m venv venv
$ source ./venv/Scripts/activate
$ pip install -r requirements.txt
For help, type:
$ python3 nith_result.py --help
To download the result of all students:
$ python3 nith_result.py
To get result of roll number 17mi526 (written inside result
directory):
$ python3 nith_result.py --roll-pattern=17mi526
roll-pattern
accepts regex, so to download result of 2017 batch:
$ python3 nith_result.py --roll-pattern='17(mi)?...'
- Implement downloads using asyncio
- Implement ranking mechanism
- Make CLI better in terms of user experience
- Use a progress bar to provide visualization of downloading (eg https://github.com/rsalmei/alive-progress)
- Add logging (preferably loguru)
- Show success vs failure rate of result being downloaded
For learning and fun. As everything should be.
I used threads initially, but I wanted to experiment with the async programming model. So I used asyncio and aiohttp.
I used beautiful soup with lxml. It was slow. And the result html page is not so complex.
TODO