This project is a more glamorous and faster Gandalf (the intranet of Epitech). On this website you can retrieve my own grades ordered by semesters and also by modules, and the possibility for you student to see your grades easily !
Go to epigrades, enter your Microsoft Epitech credentials, give your authentication code and that's it !
Tips: if you do not receive any notification, open your authenticator app and refresh the home screen to check for notifications.
For more confidentiality you will have a private token linked to your account.
First, you need to clone the repository.
$ git clone https://github.com/AlxisHenry/epigrades.git
$ cd epigrades
Note that I'm using pnpm instead of npm
$ pnpm install
$ pnpm run build
$ pnpm start
The web application is now running on http://localhost:3000
.
The puppeteer bot is used to scrap the grades from the intranet. You can use it to scrap your grades and then use the web application to see your statistics.
Note: the bot is supporting SMS 2FA authentication and Microsoft Authenticator application usage.
You need to install the apt packages with the following command:
cd scraper
bash packages.sh
$ node scraper/index.js <email> <password> <uuid>
When you run the script, you will be asked for an OTP code, which you should normally receive by phone.
You just need to run the otp.sh
script using the following command:
$ bash scraper/otp.sh <uuid> <code>
When you run the script, your A2F app will ask for a code of two digits, you can retrieve this code in the scraper/temp
folder, in png
format in a file named authenticator-<uuid>.png
.
When the script is finished, you can access with the web application to your grades with the following url:
http://localhost:3000/online/<uuid>
For example, the default file is named me.json
, so the url will be:
http://localhost:3000/online/me
The uuid
parameter is the name of the file in the scraper/reports
folder.
You can use the API to get your report in JSON format with the following command:
$ curl -X GET http://localhost:3000/api/online/<uuid>
You can get the average of all your grades with the following endpoint:
$ curl -X GET http://localhost:3000/api/average?uuid=<uuid>
Without the uuid
parameter, the API will return by default the average of the me.json
file.
Note: If the given uuid
is not found, the API will return -1
.
You can get your report (in PDF format) encoded in base64 using the following endpoint:
$ curl -X GET http://localhost:3000/api/online/<uuid>/pdf
Note: If the given uuid
is not found, the API will return null instead of the base64.