Skip to content

Commit

Permalink
github code to download latest chromedriver
Browse files Browse the repository at this point in the history
  • Loading branch information
museHD committed Sep 3, 2021
1 parent 8c87547 commit b8a1ba3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Binary file modified chromedriver.exe
Binary file not shown.
13 changes: 11 additions & 2 deletions vocab_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
# from bs4 import BeautifulSoup
# import pickle


import update
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.common.exceptions import SessionNotCreatedException
import sys
import os

Expand All @@ -48,7 +49,15 @@

#To stop the "Now listening on xxxx" logs
options.add_experimental_option('excludeSwitches', ['enable-logging'])
driver = webdriver.Chrome(executable_path=chromedriver_path,options=options)
try:
driver = webdriver.Chrome(executable_path=chromedriver_path,options=options)
except SessionNotCreatedException:
update.update_chromedriver()
driver = webdriver.Chrome(executable_path=chromedriver_path,options=options)
else:
print("Unable to create a web session")
# sys.exit()


#Base URLS + intialising lists
oxford = "https://www.lexico.com/en/definition/"
Expand Down

0 comments on commit b8a1ba3

Please sign in to comment.