The ultimate google meet attender bot, which works on the basis of number of people inside the meeting, rather than a predefined timing, which is how almost everyone makes these bots these days. This google meet attender works automatically and you can implement it in Heroku for daily automatic deployment.
This is a Google Meet bot I made for attending your classes. This will
You can change the timetable real-time using telegram from your phone. Almost everything can be controlled from telegram.
Two codes are needed to run to make this code perfect.
GoogleMeet.py
: This code is made in such a way that, if you run the code before the first class start time, it would wait for the start time and attend all the classes in the temporary timetable.telegramBot.py
: This is actually a telegram bot. It can change your time table; do all kinds of stuff by just using some telegram messages. Mainly we are using it to change timetable in the real-time.Steps to follow:
telegramBot.py
. Change timetable if needed (before any current class starts obviously).GoogleMeet.py
.I used sqlite for making a database. There are mainly 3 sets of tables.
I used selenium library for automating the joining and leaving part. It logs in to google and then redirects to your google meet link stored in the database. It waits till someone is in the meeting and joins only when a threshold number of people are present.
It takes into account how much people are in the meeting per 5 seconds, and the maximum number of people present in the class. It will leave the class when number of people inside it goes below a threshold. It even notifies you when classes are about to end automatically
By asking /help in the bot you can see all the functionalities it can implement.
/start : Start automatic session
/tt day s1 s2 s3 s4 s5 s6 : Change timetable for anyday
/dtt : Drop temp tables
/ctt : Create temp tables
/timetable : View current day timetable
This app has many notification architectures present
TELEGRAM_TOKEN
and TELEGRAM_CHAT_ID
. How to make a telegram bot
DISCORD_WEBHOOK
for that channel.(This is only for notification purposes, telegram is more than enough, but if you want to explore all features, please look around) Start exploring from here
.env
file (I haven't created it in this repository obviously due to privacy reasons.)join()
of classes.py
) (You have to make changes in __init__
of classes.py
in the user-data-dir). I came up with this because, google now has a way to know whether a bot is loggin in or not. So it blocks before you log in. SO if the profile is loaded, google cannot know whether it is a bot or not.telegramBot.py
prior to the other code. This is not necessary but is essential if first hour is changed.GoogleMeet.py
some time before your class time (Whenever you want :wink:)I recommend to run it in your PC because, if you need to study (like me :sweat_smile:) you can view it. Deploying to Heroku will take some time. Heroku has some issues. I am using sqlite3 for database purposes. The problem is that Heroku supports sqlite3, but the database will get overwritten with garbage values every 24 hours or so. Heroku's native database support is postgreSQL. So after perfecting my code, I will migrate from sqlite3 to postgreSQL and then it will be heaven my friends.
git clone https://github.com/plal99/Google-Meet-Bot.git
pip install -r requirements.txt
.env
: Make necessary changes to the env files so as to fit your personal details requirements(username, password, tokens, chatid, class links).dbStuff.py
so as to fit your class requirements requirements. This means changing
.env
file)createTimeTable()
and createTempTimeTable()
functions)class.py
(JOIN_PEOPLE
and LEAVE_PEOPLE
)Don't use this project to automate your classes. See this project only as a way of understanding how automation works and how it can even be implemented in your day to day life. I will never promote anyone to use this for attending online classes nor use it myself.
Classes are important and respect your teachers :slightly_smiling_face:.