The problem is Twitch authorization using Selenium in Python. Help, all day I can not solve the problem. Tried different browsers, selenium undetected. Error "Your browser is not yet supported. Use the recommended browser or learn more". Who else has this error? How to fix it?
If your authorization is successful, please share how to do it.
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.chrome.options import Options
import time
import json
import re
import os
PATH = os.path.join(os.path.join(os.path.join(os.getcwd()))).replace('/','//')
options = Options()
options.headless = False
options.add_argument("user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36")
options.add_argument('--ignore-ssl-errors')
options.add_argument('--no-sandbox')
options.add_argument("--disable-blink-features")
options.add_argument("--disable-blink-features=AutomationControlled")
driver = webdriver.Chrome(executable_path=r'{0}\\chromedriver.exe'.format(PATH),options=options)
driver.get("https://www.twitch.tv/")
driver.find_element_by_xpath('//*[@id="root"]/div/div[2]/nav/div/div[3]/div[3]/div/div[1]/div[1]/button/div/div').click()
self.driver.find_element_by_xpath('//*[@id="login-username"]').send_keys(login)
self.driver.find_element_by_xpath('//*[@id="password-input"]').send_keys(password)
self.driver.find_element_by_css_selector('button[data-a-target="passport-login-button"]').click()
- Tried various browsers
- Different accounts Twitch
- Selenium undetected