Skip to content

Commit

Permalink
Merge pull request #14 from alejanpa17/fix-chrome-driver-installer
Browse files Browse the repository at this point in the history
Fix chrome driver installer
  • Loading branch information
rzc0d3r authored Oct 9, 2023
2 parents ab70e56 + 9ba4b3b commit a4b7655
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.exe
*.pyc
*.txt
9 changes: 5 additions & 4 deletions modules/chrome_driver_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ def get_chrome_version():
process = Popen(["/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", "--version"], stdout=PIPE)
chrome_version = process.communicate()[0].decode("UTF-8").replace("Google Chrome", "").strip()
elif platform == "win":
chrome_version = match(r"\d{2,3}.0.\d{4}.\d{1,3}", ' '.join(listdir("C:/Program Files/Google/Chrome/Application")))
if chrome_version is not None:
chrome_version = chrome_version.group()
else:
try:
chrome_version = match(r"\d{2,3}.0.\d{4}.\d{1,3}", ' '.join(listdir("C:/Program Files/Google/Chrome/Application")))
if chrome_version is not None:
chrome_version = chrome_version.group()
except:
chrome_version = match(r"\d{2,3}.0.\d{4}.\d{1,3}", ' '.join(listdir("C:/Program Files (x86)/Google/Chrome/Application")))
if chrome_version is not None:
chrome_version = chrome_version.group()
Expand Down

0 comments on commit a4b7655

Please sign in to comment.