diff --git a/collect_links.py b/collect_links.py index 34f04af..c5d1d9a 100644 --- a/collect_links.py +++ b/collect_links.py @@ -24,6 +24,7 @@ from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.chrome.options import Options +from webdriver_manager.chrome import ChromeDriverManager import os.path as osp @@ -51,7 +52,7 @@ def __init__(self, no_gui=False): chrome_options.add_argument('--disable-dev-shm-usage') if no_gui: chrome_options.add_argument('--headless') - self.browser = webdriver.Chrome(executable, chrome_options=chrome_options) + self.browser = webdriver.Chrome(ChromeDriverManager().install(), chrome_options=chrome_options) browser_version = 'Failed to detect version' chromedriver_version = 'Failed to detect version' diff --git a/requirements.txt b/requirements.txt index a82daf0..161c283 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,4 @@ chardet idna requests selenium +webdriver-manager \ No newline at end of file