我是靠谱客的博主 香蕉糖豆,这篇文章主要介绍爬虫报错信息:Message: invalid argument: log type ‘performance‘ not found,现在分享给大家,希望可以做个参考。

在使用selenium访问网页时遇到问题,get_log('performance')失败,报错信息为:Message: invalid argument: log type 'performance' not found,

解决方法之一:

from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.chrome.options import Options

d = DesiredCapabilities.CHROME
d['loggingPrefs'] = { 'performance':'ALL' }

chrome_options = Options()
# 解决方法
chrome_options.add_experimental_option('w3c', False)

driver = webdriver.Chrome(desired_capabilities=d, options=chrome_options)

原链接为:python - Selenium Chrome can't see browser logs InvalidArgumentException - Stack Overflowhttps://stackoverflow.com/questions/56507652/selenium-chrome-cant-see-browser-logs-invalidargumentexception/56518199#56518199

最后

以上就是香蕉糖豆最近收集整理的关于爬虫报错信息:Message: invalid argument: log type ‘performance‘ not found的全部内容,更多相关爬虫报错信息:Message:内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(50)

评论列表共有 0 条评论

立即
投稿
返回
顶部