无法使用 python selenium 登录耐克

问题描述

我知道已经有另一个非常相似的问题,但我的有点不同。 问题是,您无法使用 Selenium 登录 Nike。它对我来说很有效,但不知何故它停止了工作。我正在阅读一些关于如何绕过它并找到解决方案的内容,只需使用较旧的 chrome 版本(我使用的是 chrome 驱动程序)。那行得通,但现在又不行了,耐克又一次阻止了登录。我使用的旧版本是 79。很久以前对我有用的新版本,现在是最新版本是 90。 这是我尝试登录 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()

有人知道为什么它会阻塞硒吗?我的意思是手动我可以登录,所以不是因为帐户。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)