The lockdown has compelled each one of us to attend online classes and honestly it is much of a headache. Why is that so? With the comfort that our house offers us, it is quite hard to maintain a constant attendance. So, I have come up with a solution to it! You can make a bot that will join/attend your classes for you! Yes, you’ve heard it right!
Watch the YouTube Video
I would like to highlight the point that please use these steps as an enrichment and not a path to escape from your classes. So, Lets dive right into it!
Step 1- Installing the Repository
The first step would be to go to GitHub (click here) and download the zip file under code. As you can see below:-
Step 2- Extracting the File
Next, extract the file inside to whatever location you want. (I’d suggest desktop simply)
Step 3- The Configuration
Inside the folder, you will see a config.json.example or the config.json file, open that and enter all your credentials and how you want thing to be. These are things that are in the config file;
email and Password
What you have to do now is pretty simple. Enter your username and password between the two quotations .
Second is the run at time, where you can specify the time at which you want the bot to start looking for the meetings. For example, lets say, your class is at 5:00pm and you want to set up your bot at 3:00pm, so what you can do is write 16:55 (in 24-hours format) in front of “run_at_time”. That is all! Now, the bot will start looking for the meeting at 4:55pm.
The input that you put in here will specify where the bot will go to.
If you put 1, the bot will join the meeting that is mentioned in the teams tab as well as calendar tab.
When you key in 2, the bot will go to the teams tab, search for a meeting there and join the meeting.
If you put 3, the bot will go to the calendars tab, see if the current time correlated with the time mentioned in the meeting in calendar and join accordingly.
In your teams account, if you have only one organization, that is your school, (this is the case for most of the people), leave it as 1. But if you have more than one organizations, then enter the number of the organization you want the bot to enter.
By default, the boolean value of random_delay is set as false but I’d suggest you to change it to true. If you are to do so, before joining the meeting, the bot will take a pause of 20 seconds so that it appears human-like. If you are to leave it as false, you’d be added into the meeting in milliseconds and that might be something you would not want.
The time gap between every search that the bot makes is known as check interval. To understand this, when you open the command line, you are able to see that the bot looks for a new meeting every 10 seconds like what you mentioned in front of the “check_interval” variable. I’d suggest you to leave this as default i.e., 10.
Once you have joined the meeting, you have to ensure that you dont stay in it for hours. So to insure that, you have an auto leave variable.
Here, if you mention any negative number, the bot will exit the meeting after the specified number/minutes.
When you mention any positive number, the bot will exit the meeting before the specified number/minutes.
If you leave it as 0, then the meeting would be exitted on the exact time the meeting is set to end by the organiser/teacher.
The headless variable is another boolean value.
If set as true, whatever the bot does, from logging into your account, to entering your meeting and to exiting your meeting, the bot will do it in the background and would not open a browser in the front for you to see.
If you set it as false, which I suggest you to do, the bot will show you all the steps that it takes in the front.
When you set your mute audio variable as true, the bot will mute your microphone so this is obviously what I’d suggest.
With this variable, you can decide whether you want to use Chrome, Chromium, Microsoft Edge as the browser that the bot uses. I would suggest you to leave it as default, i.e. Chrome
The last variable that you will see is the blacklist. This is used when you want to blacklist a meeting you do not want to join. Being a student, you obviously do not have the choice, so what you do here is backspace everything from the word blacklist to the last symbol in the document and add a curly bracket in the end.
Now that your config file is all set, remove the example at the end of the file and save it as config.json.
Step 4- Creating a Code Loop
The next step would be to create a command that runs the python file in a loop. To do so, open notepad, and enter the following code into it:-
Once you do so, save the file as “autorun.bat”. (UPDATE- I’ve just added my new repository on GitHub from where if you download the zip file, you do not have to follow this step!)
Step 5- Downloading Python
Before proceeding further, go to https://www.python.org/downloads/ to download the latest version of python onto your PC.
Step 6- Running the Bot
Now, this is where you would start seeing the magic happening. Double click the batch file that you just created, the autorun.bat file.
The command prompt will open and it will open a browser on its own. You would be able to see your username and password entered by itself. The bot will start looking for meetings and when it finds one, it will join it.
That is all! You now have a bot that will join and leave your meeting whenever you want it to. But this does not mean that you skip your classes and leave it upon the bot to do what you should be doing. Towards the end of the day, you will be the one sitting in the examination hall, not your bot!
Links and Codes
Batch File Code
If you are reading this article, you have probably watched the YouTube(click here) video. Thank you for your support, do comment down below whether you enjoyed this content and if we should continue making this type of content.
- How To Make A Bot That Attends Your Classes- Meet/Classroom - January 16, 2021
- Zoom Bot which Does Everything You Ever Wanted - January 9, 2021
- Step by Step Tutorial For How to Get Udemy Courses for FREE - December 15, 2020