forked from prathimacode-hub/Awesome_Python_Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGmeet_automation.py
137 lines (100 loc) · 5.15 KB
/
Gmeet_automation.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
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)