Feb-08-2020, 02:57 PM
Hi guys,
I'm very new to Python - trying to use Selenium to scrape dynamic web pages and can't even get over 1st hurdle!!!
I'm very new to Python - trying to use Selenium to scrape dynamic web pages and can't even get over 1st hurdle!!!
from selenium import webdriver browser = webdriver.Chrome('C:\Program Files (x86)\Google\Chrome\Application\chrome.exe') browser.get("https://www.python.org/")The browser opens but does not connect to the requested web page and I get the following error:
Output:Traceback (most recent call last):
File "C:\Users\Shane Duncan\OneDrive\Documents\Trading\MyFxBook Programs\Test code.py", line 32, in <module>
browser = webdriver.Chrome('C:\Program Files (x86)\Google\Chrome\Application\chrome.exe')
File "C:\Users\Shane Duncan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in __init__
self.service.start()
File "C:\Users\Shane Duncan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\common\service.py", line 98, in start
self.assert_process_still_running()
File "C:\Users\Shane Duncan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\common\service.py", line 111, in assert_process_still_running
% (self.path, return_code)
selenium.common.exceptions.WebDriverException: Message: Service C:\Program Files (x86)\Google\Chrome\Application\chrome.exe unexpectedly exited. Status code was: 0
I have no idea why I get this error - any help appreciated.