我正在尝试使用soundcloud登录,我正在将硒与谷歌浏览器一起使用。 当我按下登录按钮时出现错误“我们的机器人认为您是机器人”
这是我设置驱动程序和登录的方式
chrome_options = webdriver.ChromeOptions()
chrome_options.add_experimental_option('excludeSwitches', ['enable-automation'])
chrome_options.add_argument('window-size=1920,1080')
chrome_options.add_argument('disable-infobars')
chrome_options.add_argument('--disable-extensions')
driverLocation = "C:\\Users\\david\\Desktop\\Università\\Tesi\\chromedriver.exe"
os.environ["webdriver.chrome.driver"] = driverLocation
driver = webdriver.Chrome(driverLocation,chrome_options=chrome_options)
driver.get(site)
driver.implicitly_wait(10)
frame = driver.find_elements(By.TAG_NAME, "iframe")
print(len(frame))
driver.switch_to.frame(frame[0])
time.sleep(2)
access_form = driver.find_element_by_id('sign_in_up_email')
access_form.send_keys("harambevivenellemail@gmail.com")
time.sleep(2)
continua_btn = driver.find_elements(By.XPATH,"//button[contains(text(),'Continua')]")
continua_btn[2].click()
time.sleep(3)
password_form = driver.find_element_by_id('enter_password_field')
password_form.send_keys("****")
time.sleep(2)
access_btn = driver.find_element_by_id('enter_password_submit')
access_btn.click()