Skip to content

Mahan-AK/Sama_Course_Selector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sama Course Selector

Terminal

What does this script do?

Course selection for Universities with SamaSoft system (سامانه آموزشی سما) has always been a major hassle for me and my collegemates. This is due to the fact that this system requires an excessive number of browser requests to select the courses (making the procedure very inefficent). This puts a unnecessarily large load on university's servers and usually results in the servers going down.

This script aims to execute the procedure in a single request. It should take a few seconds to select all of your desired courses while putting much less load on the servers.

Installation

First, you'll need to clone this repository to your local drive via the following command:

$ git clone https://github.com/Mahan-AK/Sama_Course_Selector.git
$ cd Sama_Course_Selector

Alternatively, if you don't have git installed, you can download the zip file for this repository and extract it.

Requirements

This script is written in python 3 and requires selenium and requests libraries.

You can install the required libraries by running the following command:

$ pip install -r requirements.txt

If that command results in an error, you can also try:

$ python -m pip install -r requirements.txt

Usage

First, You will need to edit config.txt file and fill the required fields (you can find an example config file here):

Variable Description
host Sama main website
term Current term code
(Check config.txt for more info)
std_num Student ID
passwd1 Sama password
std_sel List of desired courses to select

Now we can run the code:

$ python SamaCourseSelector.py -c CONFIG_FILE -t ACTION_TIME

Program Usage2:

Usage: python SamaCourseSelector.py -c path_to_config_file -t starting_time

Example: python SamaCourseSelector.py -c config.txt -t 9:00

Options:
-h, --help      show this help message and exit
-c CONFIG_FILE  
-t ACTION_TIME

Additional Notes

I have only tested the script for sama system of University of Tabriz, but it should work with other sama based systems. If you happen to test it for other university, please email me with the results.

Footnotes

  1. Providing a password in config file is not necessary (for privacy reasons), you can provide your password in the login page.

  2. ACTION_TIME option should be provided in 24 hour format.

About

Course selection script for SamaSoft systems.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages