Closed reeswar21 closed 3 years ago
Uncomment line #255 from MeetNinja.py:
# print(e)
Now, the failure will show itself in the form of a traceback (error message) in the MeetNinja console window. You may then share this traceback here.
i dont understand
Open MeetNinja.py using any editor, scroll down to the end of the file (line #255), and where it says # print(e)
, go ahead and remove the #
(the space too) so it is now just print(e)
. Save this file and then run it. When it fails this time, it will show a more specific error message (traceback); you can share that error message here so I could assist you further.
okay now it says name error e is not defined
No, that is just a side effect, the actual error is above it.
AttributeError: 'NoneType' object has no attribute 'w3c'
Just for the sake of clarity, could you share all the bits you have substituted into the code except the username and password? It is quite possible something was perhaps edited incorrectly. You may share the entire section as a screenshot. Make sure you censor/remove your login credentials.
#!/usr/bin/env python
from selenium import webdriver; import requests
from selenium.webdriver.support import expected_conditions as when
from selenium.webdriver.common.by import By as by
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys
import pause; import os; import re
import time; from datetime import datetime
import colorama; from termcolor import colored
colorama.init()
###################################################################
# Meets HH:MM:SS DD/MM/YYYY
MEETS = {"https://meet.google.com/nvb-dmkd-vgb?pli=1&authuser=0": "09:00:00 30/11/2020",
# Add more Meet URLs (if any) using the same format as above
}
DURATION = 60 # Duration of each Meet in minutes
USERNAME = ""
PASSWORD = ""
BROWSER_DRIVER = "Browser Driver Path Goes Here (options below)"
# Google Chrome
# Mac: "ChromeDrivers/mac64/chromedriver"
# All required interactive elements' locators (text fields, buttons, etc.)
usernameFieldPath = ""
usernameNextButtonPath = "identifierNext"
passwordFieldPath = ""
passwordNextButtonPath = "passwordNext"
joinButton1Path = "//span[contains(text(), 'Join')]"
joinButton2Path = "//span[contains(text(), 'Ask to join')]"
endButtonPath = "[aria-label='Leave call']"
currentVersionNumber = "v3.0.0"
VERSION_CHECK_URL = "https://raw.githubusercontent.com/SHUR1K-N/MeetNinja-Google-Meet-Bot/master/versionfile.txt"
BANNER1 = colored('''
███▄ ▄███▓▓█████ ▓█████▄▄▄█████▓ ███▄ █ ██▓ ███▄ █ ▄▄▄██▀▀▀▄▄▄
▓██▒▀█▀ ██▒▓█ ▀ ▓█ ▀▓ ██▒ ▓▒ ██ ▀█ █ ▓██▒ ██ ▀█ █ ▒██ ▒████▄
▓██ ▓██░▒███ ▒███ ▒ ▓██░ ▒░▓██ ▀█ ██▒▒██▒▓██ ▀█ ██▒ ░██ ▒██ ▀█▄
▒██ ▒██ ▒▓█ ▄ ▒▓█ ▄░ ▓██▓ ░ ▓██▒ ▐▌██▒░██░▓██▒ ▐▌██▒▓██▄██▓ ░██▄▄▄▄██
▒██▒ ░██▒░▒████▒░▒████▒ ▒██▒ ░ ▒██░ ▓██░░██░▒██░ ▓██░ ▓███▒ ▓█ ▓██▒
░ ▒░ ░ ░░░ ▒░ ░░░ ▒░ ░ ▒ ░░ ░ ▒░ ▒ ▒ ░▓ ░ ▒░ ▒ ▒ ▒▓▒▒░ ▒▒ ▓▒█░
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░░ ░ ▒░ ▒ ░░ ░░ ░ ▒░ ▒ ░▒░ ▒ ▒▒ ░
░ ░ ░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░ ▒
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░''', 'blue')
BANNER2 = colored(''' ------------------------------------''', 'blue')
BANNER3 = colored(''' || MeetNinja: The Google Meet Bot ||''', 'red')
BANNER4 = colored(''' ------------------------------------''', 'blue')
def printBanner():
print(BANNER1), print(BANNER2), print(BANNER3), print(BANNER4)
def versionCheck():
global currentVersionNumber
print("\nChecking for MeetNinja updates...", end="")
crawlVersionFile = requests.get(VERSION_CHECK_URL)
crawlVersionFile = str(crawlVersionFile.content)
crawlVersionFile = re.findall(r"([0-9]+)", crawlVersionFile)
latestVersionNumber = int(''.join(crawlVersionFile))
currentVersionNumber = re.findall(r"([0-9]+)", currentVersionNumber)
currentVersionNumber = int(''.join(currentVersionNumber))
if currentVersionNumber >= latestVersionNumber:
print(colored(" You are using the latest version!\n", "green"))
elif currentVersionNumber < latestVersionNumber:
print(colored(" You are using an older version of MeetNinja.", "red"))
print(colored("Get the latest version at https://github.com/SHUR1K-N/MeetNinja-Google-Meet-Bot", "yellow"))
print(colored("Every new version comes with fixes, improvements, new features, etc..", "yellow"))
print(colored("Please do not open an Issue if you see this message and have not yet tried the latest version.", "yellow"))
def fixTimeFormat(rawTime):
rawTime = list(rawTime.split())
times = list(map(int, rawTime[0].split(":")))
dates = list(map(int, reversed(rawTime[1].split("/"))))
startTime = date + times
return startTime
def timeStamp():
timeNow = str(datetime.now())
timeRegEx = re.findall(r"([0-9]+:[0-9]+:[0-9]+)", timeNow)
return(timeRegEx[0])
def initBrowser():
print("\nInitializing browser...", end="")
if BROWSER_DRIVER.lower().startswith(" chrome"):
chromeOptions = webdriver.ChromeOptions()
chromeOptions.add_argument("--disable-infobars")
chromeOptions.add_argument("--disable-gpu")
chromeOptions.add_argument("--disable-extensions")
chromeOptions.add_argument("--window-size=800,800")
chromeOptions.add_argument("--incognito")
chromeOptions.add_experimental_option('excludeSwitches', ['enable-logging'])
chromeOptions.add_experimental_option("prefs", {"profile.default_content_setting_values.media_stream_mic": 2,
"profile.default_content_setting_values.media_stream_camera": 2,
"profile.default_content_setting_values.notifications": 2
})
driver = webdriver.Chrome (executable_path=BROWSER_DRIVER, options=chromeOptions)
def login():
print("Logging into Google account...", end="")
driver.get('https://accounts.google.com/signin')
usernameField = wait.until(when.element_to_be_clickable((by.ID, usernameFieldPath)))
time.sleep(1)
usernameField.send_keys(USERNAME)
usernameNextButton = wait.until(when.element_to_be_clickable((by.ID, usernameNextButtonPath)))
usernameNextButton.click()
passwordField = wait.until(when.element_to_be_clickable((by.NAME, passwordFieldPath)))
time.sleep(1)
passwordField.send_keys(PASSWORD)
passwordNextButton = wait.until(when.element_to_be_clickable((by.ID, passwordNextButtonPath)))
passwordNextButton.click()
time.sleep(3)
print(colored(" Success!", "green"))
def attendMeet():
print(f"\n\nNavigating to Google Meet #{meetIndex}...", end="")
driver.get(URL[2:])
print(colored(" Success!", "green"))
print(f"Entering Google Meet #{meetIndex}...", end="")
try:
joinButton = wait.until(when.element_to_be_clickable((by.XPATH, joinButton1Path)))
except:
joinButton = wait.until(when.element_to_be_clickable((by.XPATH, joinButton2Path)))
if BROWSER_DRIVER.lower().startswith("chrome"):
time.sleep(1)
action.send_keys(Keys.ESCAPE).perform()
time.sleep(1)
joinButton.click()
print(colored(" Success!", "green"))
time.sleep(1)
print(colored(f"Now attending Google Meet #{meetIndex} @{timeStamp()}", "green"), end="")
try:
joinButton = wait.until(when.element_to_be_clickable((by.XPATH, joinButton1Path))) # For another prompt that pops up for Meets being recorded
time.sleep(1)
joinButton.click()
except:
pass
def endMeet():
endButton = driver.find_element_by_css_selector(endButtonPath)
endButton.click()
print(colored(f"\nSuccessfully ended Google Meet #{meetIndex} @{timeStamp()}\n", "red"), end="")
def genericError():
# clrscr()
print(colored(" Failed!", "red"), end="")
print("\n\nPossible fixes:\n")
print("1.1 Make sure you have downloaded the latest version of MeetNinja from the GitHub page (every new iteration brings fixes and new capabilities)")
print("1.2 Make sure you have pip-installed all the required python packages mentioned in the README")
print("2.1 Check your inputs and run MeetNinja again (make sure there are no leading zeros in the Meet start times)")
print("2.2 And / Or make sure you have chosen the correct webdriver file respective of your web browser and operating system")
print("3. Make sure the generated web browser is not \"Minimized\" while MeetNinja is working")
print("4.1. Make sure the webdriver file is of the latest stable build (https://chromedriver.chromium.org/ or https://github.com/mozilla/geckodriver/releases)")
print("4.2. And / Or make sure your chosen web browser is updated to the latest version")
print("4.3. And / Or make sure the webdriver file is at least of the same version as your chosen web browser (or lower)")
print("5. Make sure the small \"time.sleep()\" delays (in seconds) in the login() and attendMeet() functions are comfortable for your internet speed")
print("6. Make sure your internet connection is stable throughout the process")
print("\nPress Enter to exit.")
input()
try:
driver.quit()
except:
pass
def clrscr():
if os.name == 'posix':
_ = os.system('clear')
else:
_ = os.system('cls')
printBanner()
def hibernate():
print("\nHibernating in 10 seconds. Press Ctrl + C to abort.")
time.sleep(13)
_ = os.system('shutdown /h /f')
############### Main ###############
if __name__ == "__main__":
printBanner()
versionCheck()
try:
DURATION *= 60
driver = initBrowser()
wait = webdriver.support.ui.WebDriverWait(driver, 5)
action = ActionChains(driver)
for meetIndex, (URL, rawTime) in enumerate(MEETS.items(), start=1):
startTime = fixTimeFormat(rawTime)
if (meetIndex <= 1):
print(colored(f"Waiting until first Meet start time [{rawTime}]...", "yellow"), end="")
else:
print(colored(f"\n\nWaiting until next Meet start time [{rawTime}]...", "yellow"), end="")
pause.until(datetime(*startTime))
print(colored(" Started!", "green"))
if (meetIndex <= 1):
login()
attendMeet()
time.sleep(DURATION)
endMeet()
print("\n\nAll Meets completed successfully.")
# hibernate()
# Uncomment above to hibernate after a 10 second countdown upon completion of all Meets (Ctrl + C to abort hibernation)
print("Press Enter to exit.")
input()
print("\nCleaning up and exiting...", end="")
driver.quit()
except KeyboardInterrupt:
# clrscr()
print("\n\nCTRL ^C\n\nThrew a wrench in the works.")
print("Press Enter to exit.")
input()
print("\nCleaning up and exiting...", end="")
driver.quit()
except:
print(e)
# Uncomment above to display error traceback (use when reporting issues)
genericError()
# Meets HH:MM:SS DD/MM/YYYY
MEETS = {"https://meet.google.com/nvb-dmkd-vgb?pli=1&authuser=0": "09:00:00 30/11/2020",
# Add more Meet URLs (if any) using the same format as above
}
DURATION = 60 # Duration of each Meet in minutes
USERNAME = ""
PASSWORD = ""
BROWSER_DRIVER = "Browser Driver Path Goes Here (options below)"
# Google Chrome
# Mac: "ChromeDrivers/mac64/chromedriver"
{"1 https://meet.google.com..."
, including the serial number of the Meet, which would be 1
in this case since it is the first Meet"Browser Driver Path Goes Here (options below)"
part with "ChromeDrivers/mac64/chromedriver"
# All required interactive elements' locators (text fields, buttons, etc.)
usernameFieldPath = ""
usernameNextButtonPath = "identifierNext"
passwordFieldPath = ""
passwordNextButtonPath = "passwordNext"
joinButton1Path = "//span[contains(text(), 'Join')]"
joinButton2Path = "//span[contains(text(), 'Ask to join')]"
endButtonPath = "[aria-label='Leave call']"
usernameFieldPath = ""
and passwordFieldPath = ""
; Just a heads up, since you probably did this assuming it has something to do with your actual login credentials while sharing this heredef fixTimeFormat(rawTime):
rawTime = list(rawTime.split())
times = list(map(int, rawTime[0].split(":")))
dates = list(map(int, reversed(rawTime[1].split("/"))))
startTime = date + times
return startTime
def initBrowser():
print("\nInitializing browser...", end="")
if BROWSER_DRIVER.lower().startswith(" chrome"):
chromeOptions = webdriver.ChromeOptions()
chromeOptions.add_argument("--disable-infobars")
chromeOptions.add_argument("--disable-gpu")
chromeOptions.add_argument("--disable-extensions")
chromeOptions.add_argument("--window-size=800,800")
chromeOptions.add_argument("--incognito")
chromeOptions.add_experimental_option('excludeSwitches', ['enable-logging'])
chromeOptions.add_experimental_option("prefs", {"profile.default_content_setting_values.media_stream_mic": 2,
"profile.default_content_setting_values.media_stream_camera": 2,
"profile.default_content_setting_values.notifications": 2
})
driver = webdriver.Chrome(executable_path=BROWSER_DRIVER, options=chromeOptions)
return
line from this function. You will have to undo this as wellPlease follow the correct and simple steps in the Usage section of MeetNinja. You seem to have made too many changes to the code that you may not be able to understand the consequences of.
do i have to put in my actual username and password in the usernamefieldpath and password field path
No, you are supposed to leave it as it was initially. You should re-clone or re-download MeetNinja from scratch and only change what is shown in the simple documentation on the MeetNinja page. Kindly, read the previous comment of this thread, it has been updated with several additional errors in your modifications.
Please follow the correct and simple steps in the Usage section of MeetNinja. You seem to have made too many changes to the code that you may not be able to understand the consequences of.
and I don't understand about removing the return line from the browser driver option?
If you make changes that you cannot understand to the code, it is highly likely you will not get your desired outcome.
As suggested in my previous comment:
You should re-clone or re-download MeetNinja from scratch and only change what is shown in the simple documentation on the MeetNinja page. Kindly, read the previous² comment of this thread, it has been updated with several additional errors in your modifications.
okay i am done with all you said but still it says the same thing?
You may share your entire code here again. Make sure you censor/remove your login credentials. Only the USERNAME
and PASSWORD
variables, nothing else.
#!/usr/bin/env python
from selenium import webdriver; import requests
from selenium.webdriver.support import expected_conditions as when
from selenium.webdriver.common.by import By as by
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys
import pause; import os; import re
import time; from datetime import datetime
import colorama; from termcolor import colored
colorama.init()
###################################################################
# Meets HH:MM:SS DD/MM/YYYY
MEETS = {"1 https://meet.google.com/pth-hjpx-ghk?pli=1&authuser=1": "09:00:00 1/12/2020",
# Add more Meet URLs (if any) using the same format as above
}
DURATION = 60 # Duration of each Meet in minutes
USERNAME = ""
PASSWORD = ""
BROWSER_DRIVER = "ChromeDrivers/mac64/chromedriver"
# Google Chrome
# Mac: "ChromeDrivers/mac64/chromedriver"
# All required interactive elements' locators (text fields, buttons, etc.)
usernameFieldPath = "identifierId"
usernameNextButtonPath = "identifierNext"
passwordFieldPath = "password"
passwordNextButtonPath = "passwordNext"
joinButton1Path = "//span[contains(text(), 'Join')]"
joinButton2Path = "//span[contains(text(), 'Ask to join')]"
endButtonPath = "[aria-label='Leave call']"
currentVersionNumber = "v3.0.0"
VERSION_CHECK_URL = "https://raw.githubusercontent.com/SHUR1K-N/MeetNinja-Google-Meet-Bot/master/versionfile.txt"
BANNER1 = colored('''
███▄ ▄███▓▓█████ ▓█████▄▄▄█████▓ ███▄ █ ██▓ ███▄ █ ▄▄▄██▀▀▀▄▄▄
▓██▒▀█▀ ██▒▓█ ▀ ▓█ ▀▓ ██▒ ▓▒ ██ ▀█ █ ▓██▒ ██ ▀█ █ ▒██ ▒████▄
▓██ ▓██░▒███ ▒███ ▒ ▓██░ ▒░▓██ ▀█ ██▒▒██▒▓██ ▀█ ██▒ ░██ ▒██ ▀█▄
▒██ ▒██ ▒▓█ ▄ ▒▓█ ▄░ ▓██▓ ░ ▓██▒ ▐▌██▒░██░▓██▒ ▐▌██▒▓██▄██▓ ░██▄▄▄▄██
▒██▒ ░██▒░▒████▒░▒████▒ ▒██▒ ░ ▒██░ ▓██░░██░▒██░ ▓██░ ▓███▒ ▓█ ▓██▒
░ ▒░ ░ ░░░ ▒░ ░░░ ▒░ ░ ▒ ░░ ░ ▒░ ▒ ▒ ░▓ ░ ▒░ ▒ ▒ ▒▓▒▒░ ▒▒ ▓▒█░
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░░ ░ ▒░ ▒ ░░ ░░ ░ ▒░ ▒ ░▒░ ▒ ▒▒ ░
░ ░ ░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░ ▒
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░''', 'blue')
BANNER2 = colored(''' ------------------------------------''', 'blue')
BANNER3 = colored(''' || MeetNinja: The Google Meet Bot ||''', 'red')
BANNER4 = colored(''' ------------------------------------''', 'blue')
def printBanner():
print(BANNER1), print(BANNER2), print(BANNER3), print(BANNER4)
def versionCheck():
global currentVersionNumber
print("\nChecking for MeetNinja updates...", end="")
crawlVersionFile = requests.get(VERSION_CHECK_URL)
crawlVersionFile = str(crawlVersionFile.content)
crawlVersionFile = re.findall(r"([0-9]+)", crawlVersionFile)
latestVersionNumber = int(''.join(crawlVersionFile))
currentVersionNumber = re.findall(r"([0-9]+)", currentVersionNumber)
currentVersionNumber = int(''.join(currentVersionNumber))
if currentVersionNumber >= latestVersionNumber:
print(colored(" You are using the latest version!\n", "green"))
elif currentVersionNumber < latestVersionNumber:
print(colored(" You are using an older version of MeetNinja.", "red"))
print(colored("Get the latest version at https://github.com/SHUR1K-N/MeetNinja-Google-Meet-Bot", "yellow"))
print(colored("Every new version comes with fixes, improvements, new features, etc..", "yellow"))
print(colored("Please do not open an Issue if you see this message and have not yet tried the latest version.", "yellow"))
def fixTimeFormat(rawTime):
rawTime = list(rawTime.split())
times = list(map(int, rawTime[0].split(":")))
dates = list(map(int, reversed(rawTime[1].split("/"))))
startTime = dates + times
return startTime
def timeStamp():
timeNow = str(datetime.now())
timeRegEx = re.findall(r"([0-9]+:[0-9]+:[0-9]+)", timeNow)
return(timeRegEx[0])
def initBrowser():
print("\nInitializing browser...", end="")
if BROWSER_DRIVER.lower().startswith("chrome"):
chromeOptions = webdriver.ChromeOptions()
chromeOptions.add_argument("--disable-infobars")
chromeOptions.add_argument("--disable-gpu")
chromeOptions.add_argument("--disable-extensions")
chromeOptions.add_argument("--window-size=800,800")
chromeOptions.add_argument("--incognito")
chromeOptions.add_experimental_option('excludeSwitches', ['enable-logging'])
chromeOptions.add_experimental_option("prefs", {"profile.default_content_setting_values.media_stream_mic": 2,
"profile.default_content_setting_values.media_stream_camera": 2,
"profile.default_content_setting_values.notifications": 2
})
driver = webdriver.Chrome(executable_path=BROWSER_DRIVER, options=chromeOptions)
elif BROWSER_DRIVER.lower().startswith("firefox"):
firefoxOptions = webdriver.FirefoxOptions()
firefoxOptions.add_argument("--width=800"), firefoxOptions.add_argument("--height=800")
# firefoxOptions.headless = True
firefoxOptions.set_preference("layers.acceleration.disabled", True)
firefoxOptions.set_preference("browser.privatebrowsing.autostart", True)
firefoxOptions.set_preference("permissions.default.microphone", 2)
firefoxOptions.set_preference("permissions.default.camera", 2)
driver = webdriver.Firefox(executable_path=BROWSER_DRIVER, options=firefoxOptions)
print(colored(" Success!", "green"))
return(driver)
def login():
print("Logging into Google account...", end="")
driver.get('https://accounts.google.com/signin')
usernameField = wait.until(when.element_to_be_clickable((by.ID, usernameFieldPath)))
time.sleep(1)
usernameField.send_keys(USERNAME)
usernameNextButton = wait.until(when.element_to_be_clickable((by.ID, usernameNextButtonPath)))
usernameNextButton.click()
passwordField = wait.until(when.element_to_be_clickable((by.NAME, passwordFieldPath)))
time.sleep(1)
passwordField.send_keys(PASSWORD)
passwordNextButton = wait.until(when.element_to_be_clickable((by.ID, passwordNextButtonPath)))
passwordNextButton.click()
time.sleep(3)
print(colored(" Success!", "green"))
def attendMeet():
print(f"\n\nNavigating to Google Meet #{meetIndex}...", end="")
driver.get(URL[2:])
print(colored(" Success!", "green"))
print(f"Entering Google Meet #{meetIndex}...", end="")
try:
joinButton = wait.until(when.element_to_be_clickable((by.XPATH, joinButton1Path)))
except:
joinButton = wait.until(when.element_to_be_clickable((by.XPATH, joinButton2Path)))
if BROWSER_DRIVER.lower().startswith("chrome"):
time.sleep(1)
action.send_keys(Keys.ESCAPE).perform()
time.sleep(1)
joinButton.click()
print(colored(" Success!", "green"))
time.sleep(1)
print(colored(f"Now attending Google Meet #{meetIndex} @{timeStamp()}", "green"), end="")
try:
joinButton = wait.until(when.element_to_be_clickable((by.XPATH, joinButton1Path))) # For another prompt that pops up for Meets being recorded
time.sleep(1)
joinButton.click()
except:
pass
def endMeet():
endButton = driver.find_element_by_css_selector(endButtonPath)
endButton.click()
print(colored(f"\nSuccessfully ended Google Meet #{meetIndex} @{timeStamp()}\n", "red"), end="")
def genericError():
# clrscr()
print(colored(" Failed!", "red"), end="")
print("\n\nPossible fixes:\n")
print("1.1 Make sure you have downloaded the latest version of MeetNinja from the GitHub page (every new iteration brings fixes and new capabilities)")
print("1.2 Make sure you have pip-installed all the required python packages mentioned in the README")
print("2.1 Check your inputs and run MeetNinja again (make sure there are no leading zeros in the Meet start times)")
print("2.2 And / Or make sure you have chosen the correct webdriver file respective of your web browser and operating system")
print("3. Make sure the generated web browser is not \"Minimized\" while MeetNinja is working")
print("4.1. Make sure the webdriver file is of the latest stable build (https://chromedriver.chromium.org/ or https://github.com/mozilla/geckodriver/releases)")
print("4.2. And / Or make sure your chosen web browser is updated to the latest version")
print("4.3. And / Or make sure the webdriver file is at least of the same version as your chosen web browser (or lower)")
print("5. Make sure the small \"time.sleep()\" delays (in seconds) in the login() and attendMeet() functions are comfortable for your internet speed")
print("6. Make sure your internet connection is stable throughout the process")
print("\nPress Enter to exit.")
input()
try:
driver.quit()
except:
pass
def clrscr():
if os.name == 'posix':
_ = os.system('clear')
else:
_ = os.system('cls')
printBanner()
def hibernate():
print("\nHibernating in 10 seconds. Press Ctrl + C to abort.")
time.sleep(13)
_ = os.system('shutdown /h /f')
############### Main ###############
if __name__ == "__main__":
printBanner()
versionCheck()
try:
DURATION *= 60
driver = initBrowser()
wait = webdriver.support.ui.WebDriverWait(driver, 5)
action = ActionChains(driver)
for meetIndex, (URL, rawTime) in enumerate(MEETS.items(), start=1):
startTime = fixTimeFormat(rawTime)
if (meetIndex <= 1):
print(colored(f"Waiting until first Meet start time [{rawTime}]...", "yellow"), end="")
else:
print(colored(f"\n\nWaiting until next Meet start time [{rawTime}]...", "yellow"), end="")
pause.until(datetime(*startTime))
print(colored(" Started!", "green"))
if (meetIndex <= 1):
login()
attendMeet()
time.sleep(DURATION)
endMeet()
print("\n\nAll Meets completed successfully.")
# hibernate()
# Uncomment above to hibernate after a 10 second countdown upon completion of all Meets (Ctrl + C to abort hibernation)
print("Press Enter to exit.")
input()
print("\nCleaning up and exiting...", end="")
driver.quit()
except KeyboardInterrupt:
# clrscr()
print("\n\nCTRL ^C\n\nThrew a wrench in the works.")
print("Press Enter to exit.")
input()
print("\nCleaning up and exiting...", end="")
driver.quit()
except:
# print(e)
# Uncomment above to display error traceback (use when reporting issues)
genericError()
Code seems fine now.
Uncomment line #255 from MeetNinja.py:
# print(e)
Now, the failure will show itself in the form of a traceback (error message) in the MeetNinja console window. You may then share this traceback here.
there you go
Initializing browser...Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 72, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: 'ChromeDrivers/mac64/chromedriver'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/reeswar/Dropbox/My Mac (Reeswars-MacBook-Pro.local)/Downloads/MeetNinja-Google-Meet-Bot-master/MeetNinja.py", line 227, in <module>
driver = initBrowser()
File "/Users/reeswar/Dropbox/My Mac (Reeswars-MacBook-Pro.local)/Downloads/MeetNinja-Google-Meet-Bot-master/MeetNinja.py", line 111, in initBrowser
driver = webdriver.Chrome(executable_path=BROWSER_DRIVER, options=chromeOptions)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
self.service.start()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 86, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/reeswar/Dropbox/My Mac (Reeswars-MacBook-Pro.local)/Downloads/MeetNinja-Google-Meet-Bot-master/MeetNinja.py", line 259, in <module>
print(e)
NameError: name 'e' is not defined
>>>
PermissionError: [Errno 13] Permission denied: 'ChromeDrivers/mac64/chromedriver'
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable may have wrong permissions.
The "chromedriver" file in your ChromeDrivers/mac64/ directory does not have sufficient permissions to run on your system.
You can fix this by navigating to the ChromeDrivers/mac64/ directory, opening a Terminal window there, and executing the following command: sudo chmod 777 chromedriver
it says no such file or directory
i can only open chromedriver in editor not in terminal
Can you share a screenshot of your Terminal window after executing the sudo chmod 777 chromedriver
command? Also, help me with the path of where you have cloned/downloaded MeetNinja.
oh wait i replaced the chromedriver file and now its working but it stopped at chrome and says it's being controlled by automated test software
MeetNinja opens a new Google Chrome window that is in Developer Mode, so that MeeNinja can work on it. If it is stuck as you mentioned, you may share a screenshot of the MeetNinja console window and the newly generated Chrome window.
Yes, as it says in the MeetNinja console window, it is waiting for the first Meet to start. You have set your first Meet's time to 09:00:00 1/12/2020
, and that is when it will start.
okay, i changed the time for now like 12.30 in my country but it didn't start? It said the same thing
Can you share your current date and time, and also your first Meet's new date and time?
Strange. The scheduling in MeetNinja solely relies on only your system time, using the datetime package.
Does the MeetNinja console window still just stay at "Waiting until first Meet start time [12:30:00 1/12/2020]..."?
yes bro it still says waiting
Since your current time is 12:34:21AM, the Meet time is to be set as 00:30:00
(24-hour format) instead of 12:30:00
. 12:30:00 in the 24-hour format would mean 12:30PM (12-hour format) in the afternoon.
okay testing on it
great bro its working ...thanks
Do report here if everything's working as intended so this Issue could then be closed.
Edit: Awesome! [Closed]
I am sorry for the trouble that I gave you and also this was a brilliant work from you..all the credits to you. print("thank you so much!")
hey ..just figuring out everything was fine until this"Initializing browser...[31m Failed![0m" can you help me out with this?