-2

我正在尝试使用 selenium 设置一个自动体育博彩机器人并在 selenium 上运行它。在服务器上运行机器人时,网站会识别到这一点,因此不允许我存款,但是当从服务器上运行它时,我不会遇到这个问题。

我试过使用代理和VPN,但这仍然不能解决问题。

该网站是1xbit.com,此图显示了尝试存款时的错误消息。在此处输入图像描述

代码:

def get_website():
    options = webdriver.ChromeOptions()
    options.add_experimental_option('excludeSwitches', ['enable-logging'])
    driver = webdriver.Chrome(options=options,executable_path=pathway)
    driver.maximize_window()
    actionChains = ActionChains(driver)
    driver.get('https://1xbit.com/live/Football/')
    return driver

本质上,我想添加代码来隐藏我在服务器上的事实......

4

1 回答 1

0

为了避免检测add_argument(),通过如下方式添加以下参数:

示例代码:

options = Options()
options.add_argument("start-maximized")
options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('excludeSwitches', ['enable-logging'])
options.add_experimental_option('useAutomationExtension', False)
options.add_argument('--disable-blink-features=AutomationControlled')
s = Service('C:\\BrowserDrivers\\chromedriver.exe')
driver = webdriver.Chrome(service=s, options=options)
driver.get('https://1xbit.com/live/Football/')

浏览器截图:

live_Football

于 2022-02-09T13:13:00.387 回答