I know there is already one other pretty similar question, but my is a bit different. The problem is, that you cant login into Nike by using Selenium. It worked along time for me, but somehow it stopped working. I was reading a bit about how to bypass that and came to the solution, to just use an older chrome version(I'm using chrome driver). That worked, how ever now its not again and Nike is again blocking the login. The old Version I was using, was 79. The new Version that did worked for me a long time ago and that is the newest Version right now is 90. This is my Code, that tried to login into Nike:
import time
from selenium import webdriver
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--disable-blink-features")
chrome_options.add_argument("--disable-blink-features=AutomationControlled")
chrome_options.add_argument("user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36")
chrome_options.add_experimental_option("excludeSwitches", ["enable-automation"])
chrome_options.add_experimental_option('useAutomationExtension', False)
driver = webdriver.Chrome(options = chrome_options)
driver.get("https://www.nike.com/login")
time.sleep(2)
email = driver.find_element_by_xpath('//input[@type="email"]')
email.send_keys("THE-EMAIL")
password = driver.find_element_by_xpath('//input[@type="password"]')
password.send_keys("THE-PASSWORD")
button = driver.find_element_by_xpath("/html/body/div[2]/div[3]/div[7]/form/div[6]/input")
button.click()
Does someone knows why its blocking selenium? I mean manually I can Login, so its not because of the Account.
The solution given by colossatr0n in this thread Can a website detect when you are using Selenium with chromedriver? worked for me. Here is a partial copy, the idea is to replace cdc_ with another string in order not to be detected:
I also had to update the line to get the button:
Selenium managed to login!