Manitej Pratha's Blog

Manitej Pratha's Blog

Automate your online classes using this script 🔥

Automate your online classes using this script 🔥

Subscribe to my newsletter and never miss my upcoming articles

Online classes are boring. So I decided to make a bot that attends on my behalf.

Features that I need

  • Join online classes without disturbing me
  • Send a message in the chatbox if someone calls me
  • Doesn't want my sleep to be spoiled

So, I Made a script. Now I don't want to write a long tutorial on how I did and all those stuff. Instead, I'll tell you how to use the script.

Technologies used

  • Python
  • Selenium
  • PyAutoGUI

GitHub Repo

Give it a ⭐ if you like my work

Video tutorial

How to run the script :

  1. Clone the repo
  2. Open terminal in folder and run the below code

    pip install -r requirements.txt
    
  3. Go to Chrome driver download and download the driver specific to your chrome version

  4. Extract the zip in C:\Program Files (x86) directory

  5. Go to today_classes.py and replace alertWords , classes and subjects with your time table

alertWords : The words for which the script need to send a message (To customize the message go to line 126)

subjects : Dictionary of timetable.

classes : Google meet links for all subjects


# WHEN THESE WORDS ARE TRIGGERED A MESSAGE WILL BE SENT
alertWords = [ "your_name", "are you there", "unmute yourself", "say something", "can you hear me"]

# TIME TABLE HERE
subjects = {'monday' : ['UNIX', 'OOAD', 'CD', 'OS', 'DBMS'],
                'wednesday' : ['CD', 'OOAD', 'OS','DBMS', 'OS'],
                'friday' : ['OOAD', 'PEHV', 'CD',  'OS', 'UNIX'],
              }

# GOOGLE MEET LINKS TO RESPECTIVE SUBJECTS
classes = { 'UNIX':    'https://meet.google.com/lookup/e3667sh3xh',
                'CD':'link_to_sub',
                'PEHV':'link_to_sub',
                'OS':'link_to_sub',
                'OOAD':'link_to_sub',
                'DBMS':'link_to_sub'
          }
  1. Go to today_classes.py line 81 and enter your email

  2. Go to today_classes.py line 88 and enter your email password

  3. That's it. There are 3 options in the script

    • get today periods

Returns list of periods today

   class -t
  • join a specific period

Opens an automated chrome browser and joins that specific subject class automatically

   class subject_name
  • automate today classes

Opens an automated chrome browser and joins all periods on the specific date automatically

   class -a

The above command will run throughout the day and exit after the last class.

That's it, folks. Do let me know if you want a tutorial on how-to!

#python#automation#selenium
 
Share this
Proudly part of