From 348d7315b67a7800ae29e8179972ed1843064c60 Mon Sep 17 00:00:00 2001 From: Yuvraj Kadale Date: Sat, 26 Sep 2020 12:42:36 +0530 Subject: [PATCH 1/8] Script to join google meets automatically --- System-Automation-Scripts/Class_buddy.py | 86 ++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 System-Automation-Scripts/Class_buddy.py diff --git a/System-Automation-Scripts/Class_buddy.py b/System-Automation-Scripts/Class_buddy.py new file mode 100644 index 00000000..a708793c --- /dev/null +++ b/System-Automation-Scripts/Class_buddy.py @@ -0,0 +1,86 @@ +from selenium import webdriver +import schedule,time +import keyboard +from selenium.webdriver.common.keys import Keys +from selenium.webdriver.common.action_chains import ActionChains +from selenium.webdriver.chrome.options import Options + +#joining Credentials +username="email@gmail.com" #enter your mail id +password="This is my password" #enter your password + +#giving camera and microphone access to the meet +opt=Options() +opt.add_argument("--disable-infobars") +opt.add_argument("start-maximized") +opt.add_argument("--disable-extensions") +# Pass the argument 1 to allow and 2 to block +opt.add_experimental_option("prefs", { \ + "profile.default_content_setting_values.media_stream_mic": 1, + "profile.default_content_setting_values.media_stream_camera": 1, + "profile.default_content_setting_values.notifications": 1 + }) +browser =webdriver.Chrome(chrome_options=opt,executable_path="C:\\Users\\Yuvraj\\Downloads\\softwares\\Webdrivers\\chromedriver_win32\\chromedriver.exe") #Enter the path of your chrome driver +browser.maximize_window() +action=ActionChains(browser) + +#function to enter the classroom +def get_into(): + keyboard.press_and_release('Tab') + time.sleep(1) + keyboard.press_and_release('Tab') + time.sleep(1) + keyboard.press_and_release('Tab') + time.sleep(1) + keyboard.press_and_release('Tab') + time.sleep(1) + keyboard.press_and_release('Tab') + time.sleep(1) + keyboard.press_and_release('Enter') + + + +def join_classes(): + + browser.get("https://calendar.google.com/") + browser.find_element_by_name("identifier").send_keys(username) + browser.find_element_by_class_name("VfPpkd-RLmnJb").click() + + browser.implicitly_wait(20) + browser.find_element_by_name("password").send_keys(password) + time.sleep(1) + browser.implicitly_wait(40) + browser.find_element_by_class_name("VfPpkd-RLmnJb").click() + + browser.implicitly_wait(15) + cursor_location=browser.find_element_by_class_name('h11RHc').location + x=cursor_location['x'] + y=cursor_location['y'] + action.move_by_offset(x+20,y).click().perform() + browser.find_element_by_class_name("w1OTme").click() +#Entering Google meet + + time.sleep(30) + + keyboard.press_and_release('ctrl+e') + keyboard.press_and_release('ctrl+d') + print("Camera And microphone turned off") + browser.implicitly_wait(10) + print("About to join the class") + get_into() + keyboard.press_and_release('Enter') + print("Slid into the classroom successfully") + time.sleep(5) + keyboard.press_and_release('Win+alt+r') + print("Class Recording Started") + +join_classes() + +#schedule according to your time table and quit the browser according to the time of completion of your class +# schedule.every().day.at("09:00").do(join_classes) + +#while True: + #schedule.run_pending() + #time.sleep(1) + + From a56e9b2f1e33c354b66a9ad94add25241810bc0e Mon Sep 17 00:00:00 2001 From: Yuvraj Kadale Date: Wed, 30 Sep 2020 18:35:07 +0530 Subject: [PATCH 2/8] changed the chrome driver path --- System-Automation-Scripts/Class_buddy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/System-Automation-Scripts/Class_buddy.py b/System-Automation-Scripts/Class_buddy.py index a708793c..a0170a34 100644 --- a/System-Automation-Scripts/Class_buddy.py +++ b/System-Automation-Scripts/Class_buddy.py @@ -20,7 +20,7 @@ "profile.default_content_setting_values.media_stream_camera": 1, "profile.default_content_setting_values.notifications": 1 }) -browser =webdriver.Chrome(chrome_options=opt,executable_path="C:\\Users\\Yuvraj\\Downloads\\softwares\\Webdrivers\\chromedriver_win32\\chromedriver.exe") #Enter the path of your chrome driver +browser =webdriver.Chrome(chrome_options=opt,executable_path="C:\\Users\\path where your chrome driver is saved") #Enter the path of your chrome driver browser.maximize_window() action=ActionChains(browser) From 7ccc5724cceb4bf7b70ad82d57e0a21772a9ba22 Mon Sep 17 00:00:00 2001 From: Yuvraj Kadale Date: Wed, 30 Sep 2020 18:46:46 +0530 Subject: [PATCH 3/8] Create Automatic attending meet --- System-Automation-Scripts/Automatic attending meet | 1 + 1 file changed, 1 insertion(+) create mode 100644 System-Automation-Scripts/Automatic attending meet diff --git a/System-Automation-Scripts/Automatic attending meet b/System-Automation-Scripts/Automatic attending meet new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/System-Automation-Scripts/Automatic attending meet @@ -0,0 +1 @@ + From 721327180cf37bd58f7c165034b11c7f804bd6c0 Mon Sep 17 00:00:00 2001 From: Yuvraj Kadale Date: Wed, 30 Sep 2020 18:47:13 +0530 Subject: [PATCH 4/8] Delete Automatic attending meet --- System-Automation-Scripts/Automatic attending meet | 1 - 1 file changed, 1 deletion(-) delete mode 100644 System-Automation-Scripts/Automatic attending meet diff --git a/System-Automation-Scripts/Automatic attending meet b/System-Automation-Scripts/Automatic attending meet deleted file mode 100644 index 8b137891..00000000 --- a/System-Automation-Scripts/Automatic attending meet +++ /dev/null @@ -1 +0,0 @@ - From 9bc33bdcee9f54b10b98e1ae2837fcb622dcb414 Mon Sep 17 00:00:00 2001 From: Yuvraj Kadale Date: Wed, 30 Sep 2020 18:55:43 +0530 Subject: [PATCH 5/8] Created new folder for readme file --- System-Automation-Scripts/Automatic attending meet/Readme.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 System-Automation-Scripts/Automatic attending meet/Readme.md diff --git a/System-Automation-Scripts/Automatic attending meet/Readme.md b/System-Automation-Scripts/Automatic attending meet/Readme.md new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/System-Automation-Scripts/Automatic attending meet/Readme.md @@ -0,0 +1 @@ + From 8b82b3ed4c24d333a7c265633feac9f004fa89e3 Mon Sep 17 00:00:00 2001 From: Yuvraj Kadale Date: Wed, 30 Sep 2020 18:56:58 +0530 Subject: [PATCH 6/8] Rename System-Automation-Scripts/Class_buddy.py to System-Automation-Scripts/Automatic attending meet/Class_buddy.py --- .../{ => Automatic attending meet}/Class_buddy.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename System-Automation-Scripts/{ => Automatic attending meet}/Class_buddy.py (100%) diff --git a/System-Automation-Scripts/Class_buddy.py b/System-Automation-Scripts/Automatic attending meet/Class_buddy.py similarity index 100% rename from System-Automation-Scripts/Class_buddy.py rename to System-Automation-Scripts/Automatic attending meet/Class_buddy.py From 1d8ee2c06eb4cb3da58536863ebfbc85326e5558 Mon Sep 17 00:00:00 2001 From: Yuvraj Kadale Date: Wed, 30 Sep 2020 18:58:36 +0530 Subject: [PATCH 7/8] Update Readme.md --- .../Automatic attending meet/Readme.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/System-Automation-Scripts/Automatic attending meet/Readme.md b/System-Automation-Scripts/Automatic attending meet/Readme.md index 8b137891..cf221786 100644 --- a/System-Automation-Scripts/Automatic attending meet/Readme.md +++ b/System-Automation-Scripts/Automatic attending meet/Readme.md @@ -1 +1,8 @@ +# Online_Class_buddy +This buddy will help you to attain online classes in your absence and will record the class for you. So as to review/revise when required. + +## Quick links to the driver: + + + From b33323e8d3e2ecdb73a19ce3b987c4ad4ebc8edf Mon Sep 17 00:00:00 2001 From: Yuvraj Kadale Date: Wed, 30 Sep 2020 19:04:33 +0530 Subject: [PATCH 8/8] Update Readme.md --- .../Automatic attending meet/Readme.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/System-Automation-Scripts/Automatic attending meet/Readme.md b/System-Automation-Scripts/Automatic attending meet/Readme.md index cf221786..0a37b60b 100644 --- a/System-Automation-Scripts/Automatic attending meet/Readme.md +++ b/System-Automation-Scripts/Automatic attending meet/Readme.md @@ -6,3 +6,10 @@ This buddy will help you to attain online classes in your absence and will recor +### How to use? + +Download the chrome driver from the above link. +

Enter the path where the driver is saved in the code

+

Enter your mail id and password

+

& you are ready to go

+