Как мне обойти средства распознавания ботов для селена webdriver с chrome? - PullRequest
0 голосов
/ 04 апреля 2020

Я пытаюсь войти в систему с помощью Soundcloud, я использую Селен с Google chrome. Когда я нажимаю кнопку входа в систему, появляется сообщение об ошибке «наши роботы думают, что вы робот»

Так я настраиваю драйвер и вход в систему

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()
...