I'm scraping with selenium (Firefox) in python.
I'm having trouble accessing the https page because I got an error.
You can access the http page.
If anyone knows the solution, please let me know.
Using Firefox is a prerequisite.
Environment
centos6(vagrant)
python 3.5
selenium (3.0.2)
Xvfb
Firefox 45
Error Contents
Traceback (most recent call last):
File "cer.py", line 17, in
driver.get('https://www.google.co.jp/')
File"/home/vagrant/.pyenv/versions/3.5.1/lib/python 3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 248, inget
self.execute(Command.GET, {'url':url})
File"/home/vagrant/.pyenv/versions/3.5.1/lib/python 3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 236, in execute
self.error_handler.check_response(response)
File"/home/vagrant/.pyenv/versions/3.5.1/lib/python 3.5/site-packages/selenium/webdriver/remote/errorhandler.py", line 192, check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exception.WebDriverException:Message:Error loading page
Error Source Code
from selenium import webdriver
profile=webdriver.FirefoxProfile()
# ignore a certificate warning
profile.accept_untrusted_certs=True
profile.assume_untrusted_cert_issuer=False
driver=webdriver.Firefox(firefox_profile=profile)
driver.get('https://www.google.co.jp/')
driver.close()
You can now access it when you turn off anti-virus software...
© 2024 OneMinuteCode. All rights reserved.