绕过旋转门蟒硒

Bypass Turnstile python selenium

提问人:Andrex Youtube 提问时间:11/4/2023 最后编辑:Andrex Youtube 更新时间:11/4/2023 访问量:81

问:

我正在编写一个自动更新 mc 服务器的机器人,但我无法让它解决验证码,它说错误并且不会让我解决它:

import undetected_chromedriver as uc
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import time


options = uc.ChromeOptions()
options.headless = False  # Set headless to False if you don't want a headless browser

driver = uc.Chrome(options=options, use_subprocess=True, driver_executable_path="F:/Python/chromedriver.exe")
driver.get('https://client.falixnodes.net/timer?id=serverid')

time.sleep(4)  # Adjust the sleep duration as needed

# Find the "Accept all & visit the site" button by its ID and click it
accept_button = WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.ID, 'accept-choices')))
accept_button.click()

# Wait for a short time to allow the changes to take effect
import time
time.sleep(2)  # Adjust the sleep duration as needed

# Find the close button by its class name and click it
close_button = WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.CLASS_NAME, 'swal2-close')))
close_button.click()

input("Press Enter to close the browser...")

driver.quit()

这是我的代码。

我尝试使用undetected_chromedriver和谷歌搜索,但没有任何帮助

我只是不想购买 7 美元/月的订阅,我已经有一个 2 美元/月的订阅

python cloudflare 验证码

评论


答: 暂无答案