autobsi ·
autobsi is a script that allows you to automatically attend your class on the My Best BSI site. It features a scheduler that will automatically start the script when your class starts, it is also able to run when you are inside your class schedule. You can run it on your computer or host it on a cloud server like Heroku.
Make sure you have installed all of the following prerequisites on your machine:
- Git - Download & Install Git.
- Python version 3.8 or higher - Download & Install Python.
- Google Chrome version 90 or higher.
First before running the script. You need to set up the src/config.json
to allow the script to log in and attend the class. Follow these steps:
- In the timetable section, you can find days for classes that you have to take per week. Change those days based on your schedule. Make sure it's written in English and typed correctly.
- Inside the timetable you can find the name, time, and link. The name is for your class name, you can name it whatever you want here. The time is your class schedule, it's a list that consists of when your class starts and ends, it's formatted as 'HH:MM' i.e '12:30'. The link is the URL of the class that you attend, you can get it on My Best in your class attendance section.
- The last section is the username (nim) and password. This data is used to allow the script to log in to your My Best Account.
Cloud tutorial coming soon...
Note: If you have multiple classes a day, you will need to wrap your class name, time, and link to a list. The time section is always a list, so it's nested inside a list when you have more than one class a day. See the example at Thursday class on the default src/config.json
.
Follow all these steps shown below to use the script.
-
Clone this repository. Run:
git clone https://github.com/ccrsxx/autobsi.git
-
Change the directory to the autobsi folder. Run:
cd autobsi
-
Install the dependencies with pip. Run:
pip install -r requirements.txt
-
Install the webdriver for selenium. Run:
python setup.py
-
Run the script:
python main.py
Note: If you are running the script locally or on a Windows machine, follow these additional steps in the main.py
:
- Change the get method from
get_from_heroku
toget_from_config
. - Change the cloud parameter from
True
toFalse
. - Change the mail parameter from
True
toFalse
to prevent an authentication error traceback. If you have a google mail API, don't change this parameter.