4

I am learning to use Selenium and my goal is to open zoom through a python program on a Raspberry Pi 4. Upon running the pasted code, the program works as intended; opens zoom in browser, maximizes window, selects and clicks sign in, enters credentials and then presses enter. After log in is attempted I am given "error: Http 401 error". I am guessing this is because zoom is detecting an auto-login and blocking me. First off, am I correct? And if so, is there any way to get around this? Or does zoom block any auto filling of credentials.

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
driver=webdriver.Chrome()

driver.get("https://zoom.us")
driver.maximize_window()

elem = driver.find_element(By.XPATH, "//a[contains(text(),'SIGN IN')]").click()
emailField = driver.find_element(By.XPATH, "//input[@id='email']")
emailField.send_keys("email")          #"email" replaced with zoom login
passField = driver.find_element(By.XPATH, "//input[@id='password']")
passField.send_keys("password")        #"password" replaced with zoom password 
passField.send_keys(Keys.RETURN)
lg10121
  • 41
  • 1
  • you can be right. I used Selenium to open Firefox and later I try manually login, reset password, create new account - and all of them give `error: Http 401 error`. But if I open Firefox manually then all work correctly. – furas Nov 24 '21 at 01:18
  • I don't know what you want to do after login but zoom has [API](https://marketplace.zoom.us/docs/api-reference/zoom-api) so maybe you can do it with `requests` and `API` – furas Nov 24 '21 at 01:19
  • I am also facing the same issue. Did you find any solution so far to this problem? – Sachin Ramdhan Boob Apr 25 '22 at 12:25

2 Answers2

0

I faced the same issue, and was able to get around the bot-detection by using the undetected-chromedriver package.

replace

from selenium import webdriver
...
driver = webdriver.chrome()

with

import undetected_chromedriver.v2 as ucdriver
...
driver = ucdriver.Chrome()
Leddy231
  • 63
  • 5
0

Add this to your code, right after the libraries import, and it will work:

options = webdriver.ChromeOptions()
options.add_argument('--disable-blink-features=AutomationControlled')
#in executable_path put the path to your chromedriver.exe
driver = webdriver.Chrome(options=options, executable_path=r'C:\WebDrivers\chromedriver.exe')
driver.get("https://zoom.us")