Skip to content

Commit

Permalink
fix: fixed bug with new Chrome update due to
Browse files Browse the repository at this point in the history
license file
  • Loading branch information
Luca Giannotti committed Jul 25, 2024
1 parent 900a61c commit 3c97068
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion dining_hall_scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import os



Expand All @@ -18,7 +19,13 @@ def dining_hall_web_scraper(dining_hall, meal):
# chrome_options.add_argument("--disable-dev-shm-usage")
# chrome_options.add_argument("window-size=1920x1080")

driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()), options=chrome_options)
driver_path = ChromeDriverManager().install()
if driver_path:
driver_name = os.path.basename(driver_path)
if driver_name != "chromedriver.exe":
driver_path = os.path.join(os.path.dirname(driver_path), "chromedriver.exe")

driver = webdriver.Chrome(service=ChromeService(driver_path), options=chrome_options)

driver.get(url)

Expand Down

0 comments on commit 3c97068

Please sign in to comment.