Skip to content

Commit

Permalink
Merge pull request prathimacode-hub#1069 from Knighthawk-Leo/main
Browse files Browse the repository at this point in the history
Google Meet Automation
  • Loading branch information
prathimacode-hub authored Oct 31, 2021
2 parents dca1bb0 + 4ecafed commit 6f3d2c7
Show file tree
Hide file tree
Showing 7 changed files with 185 additions and 0 deletions.
137 changes: 137 additions & 0 deletions AutomationScripts/Google Meet Automation/Gmeet_automation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
# An Automation script to automatically join a scheduled google-meet meeting at a specific time without manual labour.

# importing the required python packages
import pyautogui
import webbrowser
import time
from datetime import datetime
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.options import Options

print("THIS IS A PROGRAM FOR GMEET AUTOMATION\nThis PROGRAM WILL HELP YOU TO JOIN YOUR CLASSES ON TIME\nTHANKS TO SANSKAR DWIVEDI FOR MAKING THIS\n\n")
#checking for todays time and day
now = datetime.now()
current_day = now.strftime("%H:%M/%A")
print(current_day)




while True:
now = datetime.now() # check the current system time
day=now.strftime("%A")
justtime=int(now.strftime("%H%M"))#taking time and day
print(justtime)
s=now.strftime("%S")
se=int(s)

while(940<=justtime): #checking for the condition of time
#MATHS SHEDULE for different classes according to day
if(day=="Monday" and 955<=justtime<=1050 or day=="Wednesday" and 955<=justtime<=1050 or day=="Thursday" and 1055<=justtime<=1250 or day=="Friday" and 1255<=justtime<=1250):
pyautogui.prompt(text="YOU ARE JOINING TO MATHS CLASS HOPE YOU COMPLETED THE PREVIOUS STUFFS")
time.sleep(2)
webbrowser.get("C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s").open_new("https://meet.google.com/weg-kaez-ytb")


time.sleep(5)#sleep for 5s
pyautogui.click(659, 960) #click for join
time.sleep(5)
pyautogui.hotkey('ctrl','d') #to turnoff camera
time.sleep(5)
pyautogui.click(1425, 720) #turnoff mike
time.sleep(2500)
break
#BEE SHEDULE
if(day=="Monday" and 1055<=justtime<=1150 or day=="Thursday" and 1155<=justtime<=1250 or day=="Friday" and 1055<=justtime<=1150):
print("YOU ARE JOINING TO BEE CLASS HOPE YOU COMPLETED THE PREVIOUS STUFF")

time.sleep(2)
webbrowser.get("C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s").open_new("https://meet.google.com/pex-ktrx-qrk")
time.sleep(5)
pyautogui.click(659, 960)
time.sleep(5)
pyautogui.hotkey('ctrl','d')
time.sleep(5)
pyautogui.click(1425, 720)
time.sleep(2500)


#CHEMISTRY SHEDULE
if(day=="Monday" and 1155<=justtime<=1250 or day=="Tuesday" and 955<=justtime<=1050 or day=="Wednesday" and 1155<=justtime<=1250):

print("YOU ARE JOINING TO CHEMISTRY CLASS HOPE YOU COMPLETED THE PREVIOUS STUFF")
time.sleep(2)
webbrowser.get("C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s").open_new("https://meet.google.com/sbp-urci-ibv")
time.sleep(5)
pyautogui.click(659, 960)
time.sleep(5)
pyautogui.hotkey('ctrl','d')
time.sleep(5)
pyautogui.click(1425, 720)
time.sleep(2500)
break
#ECOLOGY SHEDULE
if(day=="Tuesday" and 1155<=justtime<=1250 or day=="Wednesday" and 1055<=justtime<=1150 or day=="Thursday" and 940<=justtime<=1050 ):

print("YOU ARE JOINING TO ECOLOGY CLASS HOPE YOU COMPLETED THE PREVIOUS STUFFS")

webbrowser.get("C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s").open_new("https://meet.google.com/vhg-ptym-znf")
time.sleep(5)
pyautogui.click(659, 960)
time.sleep(5)
pyautogui.hotkey('ctrl','d')
time.sleep(5)
pyautogui.click(1425, 720)
time.sleep(2500)
break

#IWT SHEDULE
if(day=="Tuesday" and 1050<=justtime<=1150 or day=="Friday" and 955<=justtime<=1050 ):
print("YOU ARE JOINING TO MATHS CLASS HOPE YOU COMPLETED THE PREVIOUS STUFFS")
time.sleep(2)
webbrowser.get("C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s").open_new("https://meet.google.com/aed-dnej-jta")
time.sleep(5)
pyautogui.click(659, 960)
time.sleep(5)
pyautogui.hotkey('ctrl','d')
time.sleep(5)
pyautogui.click(1425, 720)
time.sleep(2500)
break

if(justtime>1500):

pyautogui.alert(text='classes are over you are joining to test class ',button='ok')
time.sleep(2)
webbrowser.get("C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s").open_new("https://meet.google.com/dqy-tgte-vco")
time.sleep(5)
pyautogui.click(659, 960)
time.sleep(5)
pyautogui.hotkey('ctrl','d')
time.sleep(5)
pyautogui.click(1425, 720)
time.sleep(2500)
break

quit()
break


time.sleep(60-se)
















Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions AutomationScripts/Google Meet Automation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# GOOGLE-MEET-ASSISTANT-FOR-ONLINE-CLASSES
This a simple python program to attend your online gmeet classes accordinf to your time table.

you just have to open the file untill your class get over.

# What are the main features-
* Attend you class on time
* No need to search links every time
* It will auto turnoff the camera
* It will auto Turnoff your mic
* It will auto give the request to join.
* It can shift you to the next class without disturbing the previous one.



## you need to install following libraries to run this python program in cmd
```
pip install pyautogui
pip install webbrowser
pip install time
pip install datetime
```
### Changes Need In the code
* Change the Google meet links (starting from line 65)
* Change the time of classes according to your need


## Step01
<img src="Images/gm01.png">

## Step02
<img src="Images/gw02.png">

10 changes: 10 additions & 0 deletions AutomationScripts/Google Meet Automation/curpostion.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import pyautogui, sys
print('Press Ctrl-C to quit.')
try:
while True:
x, y = pyautogui.position()
positionStr = 'X: ' + str(x).rjust(4) + ' Y: ' + str(y).rjust(4)
print(positionStr, end='')
print('\b' * len(positionStr), end='', flush=True)
except KeyboardInterrupt:
print('\n')
4 changes: 4 additions & 0 deletions AutomationScripts/Google Meet Automation/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pip install pyautogui
pip install webbrowser
pip install time
pip install datetime

0 comments on commit 6f3d2c7

Please sign in to comment.