gpt4 book ai didi

python - 我试图以 headless (headless)模式打开一个站点,但它似乎陷入了一个激进的循环,我该如何解决?

转载 作者:行者123 更新时间:2023-12-05 06:00:07 25 4
gpt4 key购买 nike

我正在尝试以 headless (headless)模式打开网站,但它似乎卡在了一个激进的循环中,我该如何解决?这是我的代码:

from selenium import webdriver
from selenium.webdriver.chrome.options import Options

web = "https://www.powerplay.com/sportsbook/SOCCER/"
chrome_options = Options()
chrome_options.headless = True

driver = webdriver.Chrome(options=chrome_options)
driver.get(web)

我得到的错误:

[0605/021633.437:INFO:CONSOLE(0)] "Error with Permissions-Policy header: Unrecognized feature: 'interest-cohort'.", source:  (0)
[0605/021634.456:INFO:CONSOLE(5)] "'window.webkitStorageInfo' is deprecated. Please use 'navigator.webkitTemporaryStorage' or 'navigator.webkitPersistentStorage' instead.", source: (5)
[0605/021637.724:INFO:CONSOLE(0)] "Error with Permissions-Policy header: Unrecognized feature: 'interest-cohort'.", source: (0)
[0605/021638.445:INFO:CONSOLE(5)] "'window.webkitStorageInfo' is deprecated. Please use 'navigator.webkitTemporaryStorage' or 'navigator.webkitPersistentStorage' instead.", source: (5)
[0605/021641.860:INFO:CONSOLE(0)] "Error with Permissions-Policy header: Unrecognized feature: 'interest-cohort'.", source: (0)
[0605/021642.577:INFO:CONSOLE(5)] "'window.webkitStorageInfo' is deprecated. Please use 'navigator.webkitTemporaryStorage' or 'navigator.webkitPersistentStorage' instead.", source: (5)
[0605/021645.992:INFO:CONSOLE(0)] "Error with Permissions-Policy header: Unrecognized feature: 'interest-cohort'.", source: (0)
[0605/021646.629:INFO:CONSOLE(5)] "'window.webkitStorageInfo' is deprecated. Please use 'navigator.webkitTemporaryStorage' or 'navigator.webkitPersistentStorage' instead.", source: (5)
[0605/021650.126:INFO:CONSOLE(0)] "Error with Permissions-Policy header: Unrecognized feature: 'interest-cohort'.", source: (0)
[0605/021650.798:INFO:CONSOLE(5)] "'window.webkitStorageInfo' is deprecated. Please use 'navigator.webkitTemporaryStorage' or 'navigator.webkitPersistentStorage' instead.", source: (5)
[0605/021654.261:INFO:CONSOLE(0)] "Error with Permissions-Policy header: Unrecognized feature: 'interest-cohort'.", source: (0)
[0605/021701.759:INFO:CONSOLE(5)] "'window.webkitStorageInfo' is deprecated. Please use 'navigator.webkitTemporaryStorage' or 'navigator.webkitPersistentStorage' instead.", source: (5)
[0605/021709.680:INFO:CONSOLE(0)] "Error with Permissions-Policy header: Unrecognized feature: 'interest-cohort'.", source: (0)

不断重复

最佳答案

我尝试添加这个并且它有效

chrome_options.add_argument('--log-level=1')

来源List of Chromium Command Line Switches

log-level: Sets the minimum log level.
Valid values are from 0 to 3:

INFO = 0 (default)
WARNING = 1
LOG_ERROR = 2
LOG_FATAL = 3

关于python - 我试图以 headless (headless)模式打开一个站点,但它似乎陷入了一个激进的循环,我该如何解决?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67851973/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com