Skip to content

Commit 6279212

Browse files
authored
Merge pull request #800 from rahulvansh66/gmeet_zoom
Added function to join zoom meeting link as suggested in issue #796
2 parents 3aafab0 + 5ea19df commit 6279212

File tree

7 files changed

+118
-66
lines changed

7 files changed

+118
-66
lines changed

gmeet_joiner/README.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

gmeet_joiner/main.py

Lines changed: 0 additions & 35 deletions
This file was deleted.

gmeet_joiner/requirements.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

gmeet_zoom_joiner/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# gmeet_zoom_bot.py
2+
3+
This python script will help you to join daily repetitive classes easily.
4+
5+
- It'll join google meet or zoom meeting as per given time and link.
6+
7+
## Setup instructions
8+
9+
10+
- Firstly clone the project to the desired location, and locate it in the terminal. You would have to download the required modules, you can do this by doing:
11+
`pip install -r requirements.txt` or `pip3 install -r requirements.txt`
12+
13+
- You can now modify the script slightly according to your schedule:
14+
1) If you are using chrome as you browser then, in `gMeet()` function replace the `for i in range(4)` with `for i in range(5)`. ( If you are using safari do not change the script.)
15+
16+
2) Now you can assign your links to `url1` and `url2` variables.
17+
18+
3) You can replace the timings in main function.
19+
20+
4) Lastly you can replace 'command' with 'ctrl' if you are on windows.
21+
22+
- This script will let you run two meetings that you have on a daily bases, still you can add more if you wish.
23+
24+
- Please note: The following program supports python3
25+
26+
## Detailed explanation of script, if needed
27+
28+
Below two key modules of this script.
29+
30+
* `pyautogui` module is used for automation
31+
* `schedule` module is used to schedule meeting
32+
33+
## Output
34+
35+
Join meeting as per given time and link

gmeet_zoom_joiner/gmeet_zoom_bot.py

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
import time
2+
import webbrowser
3+
import schedule
4+
import pyautogui
5+
import pyperclip
6+
7+
8+
url1 = "PASTE gmeet link/zoom link/zoom meeting id"
9+
url2 = "PASTE gmeet link/zoom link/zoom meeting id"
10+
11+
12+
def gMeet(url):
13+
webbrowser.open(url)
14+
time.sleep(3)
15+
print("Joining Class")
16+
time.sleep(2)
17+
pyautogui.hotkey('command', 'd')
18+
print("Turned off camera")
19+
pyautogui.hotkey('command', 'e')
20+
print("Turned off mic")
21+
time.sleep(3)
22+
23+
for i in range(4):
24+
pyautogui.press('tab')
25+
26+
time.sleep(3)
27+
pyautogui.press('enter')
28+
29+
30+
def zMeet(url):
31+
# copy link
32+
pyperclip.copy(url)
33+
34+
time.sleep(0.2)
35+
36+
pyautogui.press('esc', interval=0.1)
37+
38+
time.sleep(0.3)
39+
40+
# open shart
41+
pyautogui.press('win', interval=0.5)
42+
# type zoom
43+
pyautogui.write('zoom')
44+
time.sleep(2)
45+
# press enter
46+
pyautogui.press('enter', interval=0.5)
47+
48+
time.sleep(8)
49+
50+
# Click zoom button
51+
x, y = pyautogui.locateCenterOnScreen('zoom_btn.png')
52+
pyautogui.click(x, y)
53+
54+
pyautogui.press('enter', interval=0.5)
55+
56+
# paste link
57+
pyautogui.hotkey('ctrl', 'v')
58+
59+
# use tabs to move to next section
60+
pyautogui.press('tab', interval=0.5)
61+
pyautogui.press('tab', interval=0.5)
62+
pyautogui.press('tab', interval=0.5)
63+
pyautogui.press('enter', interval=0.5) # mute mic
64+
65+
pyautogui.press('tab', interval=0.5)
66+
pyautogui.press('enter', interval=0.5) # turn off camera
67+
68+
pyautogui.press('tab', interval=0.5)
69+
pyautogui.press('enter', interval=3) # join zoom link
70+
71+
72+
if __name__ == "__main__":
73+
schedule.every().day.at("16:00").do(gMeet(url1) if (
74+
url1.startswith("https://meet")) else zMeet(url1))
75+
schedule.every().day.at("06:00").do(gMeet(url2) if (
76+
url2.startswith("https://meet")) else zMeet(url2))
77+
78+
while True:
79+
schedule.run_pending() # check if we need to run anything
80+
time.sleep(10) # wait 10 second before checking again'''

gmeet_zoom_joiner/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
PyAutoGUI==0.9.52
2+
pyperclip==1.8.2
3+
schedule==1.1.0

gmeet_zoom_joiner/zoom_btn.png

3.04 KB
Loading

0 commit comments

Comments
 (0)