[英]ERROR - Message: Can't load the profile. Profile Dir… Selenium Web Scraping with Firefox
I am running a web scraper using selenium and from time to time, I 我正在使用硒运行网络刮板,我有时会
ERROR - Message: Can't load the profile. Profile Dir: %s If you specified a log_file in the FirefoxBinary constructor, check it for details.
I know it means selenium can't open a session but how do I resolve this? 我知道这意味着Selenium无法打开会话,但是我该如何解决呢? Should I put in a retry mechanism with an exponential backoff?
我应该采用具有指数补偿的重试机制吗? Is it a bug in selenium?
这是硒中的错误吗?
I don't know but any help in resolving this issue would be much appreciated. 我不知道,但是对解决此问题的任何帮助将不胜感激。 Thanks.
谢谢。
$ brew install geckodriver
$ pip install -U selenium
firefox_capabilities = DesiredCapabilities.FIREFOX
firefox_capabilities['marionette'] = True
driver = webdriver.Firefox(capabilities=firefox_capabilities)
driver.get('http://example.com')
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.