1

我已经部署了我的脚本,它是一个使用未检测到的 chrome(这个库)的刮板。有人可以让我知道是什么问题..我们已经更新了硒,但这个问题仍然显示在 pythonanywhere 控制台...

import undetected_chromedriver.v2 as uc

chrome_options = uc.ChromeOptions()
chrome_options.add_argument("--headless")
chrome_options.add_argument("--no-sandbox")

chrome_options.add_argument(f"user-agent={user_agents}")

chrome_path = which("./chromedriver")
drive = uc.Chrome()
drive.maximize_window()

with drive:
    drive.get(Url)
drive.implicitly_wait(5)

这是一个代码示例。我们已经包含在函数中并将 Urls(多个)传递给它..需要关于这个问题的帮助..因为它在本地工作正常..

4

0 回答 0