From a1d0f16ab0a79c383acdd2f099a5dbebdadd1dc2 Mon Sep 17 00:00:00 2001 From: Me Date: Sun, 11 Mar 2018 23:22:41 +0100 Subject: [PATCH] check for ubuntu package chromedriver path and use it if available. Signed-off-by: Me --- audible-activator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/audible-activator.py b/audible-activator.py index 52f356c..93dc9c9 100755 --- a/audible-activator.py +++ b/audible-activator.py @@ -56,8 +56,10 @@ def fetch_activation_bytes(username, password, options): else: if sys.platform == 'win32': chromedriver_path = "chromedriver.exe" - else: + elif os.path.isfile("/usr/lib/chromium-browser/chromedriver"): # Ubuntu package chromedriver path chromedriver_path = "/usr/lib/chromium-browser/chromedriver" + else: + chromedriver_path = "./chromedriver" driver = webdriver.Chrome(chrome_options=opts, executable_path=chromedriver_path)