我正在使用selenium自动登录网站https:// Fiverraffiliates.com/loginaffiliate/。但 Selenium 没有加载页面。
它只显示一个白色网站,什么也没有发生(下图)。
这是我的代码:
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.common.exceptions import NoSuchElementException
import time
driver = webdriver.Chrome()
driver.implicitly_wait(10)
url = "https://fiverraffiliates.com/loginaffiliate/"
while True:
try:
driver.get(url)
time.sleep(10)
username_input = driver.find_element(By.NAME, "user")
print("Success")
break
except NoSuchElementException:
time.sleep(10)
driver.refresh()
请指导我解决这个问题。我需要使用selenium访问这个网站并自动登录。
我也尝试过,但它对我不起作用。我的假设是他们正在检测 Selenium 的使用情况,而不是故意加载该网站。