METU Auto Capacity Checker

an auto capacity checker for METU

Readme Card

Maintained - yes image image

Warning Currently use this system to check the change of course capacity.

Installation

  • Download Chrome Webdriver or Firefox Geckodriver
  • Locate it somewhere to easily reach
  • Create Python environment using mkvirtualenv capacity-checker -p Python3
  • Inside the environment, install requirements pip install -r requirements.txt
  • Modify necessary parameters inside run.py
  • Run python run.py
  • When the website is loaded correctly, type ok in terminal and hit enter
  • Enjoy ☕️

Sound Based Feedback

  • For MacOS, it is already provided
  • For Windows users, pip install winsound
  • e.g. winsound.Beep(440,1000) # freq 440, 1000ms

Telegram Installation

  • Create a bot on Telegram talking with BotFather
  • Run telegram-send --configure on terminal
  • Insert the created bot token
  • Enter the shown password in your Telegram Chat
  • Voila 🎉

Discord Installation

  • Create a custom server and channel to follow course capacity
  • Open the integrations tab while editing your channel,
  • Add a webhook
  • Copy webhook url and paste it to discord_webhook_url in run.py
  • Take care 🏖

Parameters

Parameter Type Notes
class_code string Class code e.g. 201 (Circuit 1)
department_code string Department code e.g. 567 (Electrical Electronics Engineering)
discord_bot bool True if you want Discord Message from your server for available capacity.
discord_webhook_url string Webhook URL for discord
driver_path string Chromedriver or Firefox Driver path
refresh_rate int Refresh rate for checker in seconds e.g. 5
section_no int Section no e.g. 1
semester string Semester code e.g. 20212 (2021-2022 Spring)
telegram_bot bool True if you want Telegram Message for available capacity.
voice_feedback bool True if you want voice feedback. Tested only on macOS

Notes

  • Based on Sis METU
  • Used Chromedriver version: ChromeDriver 99.0.4844.51 but others will work
  • Voice feedback is tested only on macOS
  • Download the latest or suitable version for Chrome from https://chromedriver.chromium.org/downloads
  • Download the latest or suitable version for Firefox Geckodriver from https://github.com/mozilla/geckodriver/releases