mirror of
https://github.com/inAudible-NG/audible-activator.git
synced 2024-11-18 03:18:57 +01:00
Get chromedriver
path from the system path
This is cross platform and avoids the need to download Chrome Driver to the project directory.
This commit is contained in:
parent
da9d09e945
commit
c14bf5e2d5
@ -14,6 +14,7 @@ import requests
|
|||||||
import os
|
import os
|
||||||
import common
|
import common
|
||||||
import binascii
|
import binascii
|
||||||
|
import distutils.spawn
|
||||||
|
|
||||||
|
|
||||||
def fetch_activation_bytes(username, password, options):
|
def fetch_activation_bytes(username, password, options):
|
||||||
@ -48,10 +49,7 @@ def fetch_activation_bytes(username, password, options):
|
|||||||
'openid.return_to': base_url + 'player-auth-token?playerType=software&playerId=%s=&bp_ua=y&playerModel=Desktop&playerManufacturer=Audible' % (player_id)
|
'openid.return_to': base_url + 'player-auth-token?playerType=software&playerId=%s=&bp_ua=y&playerModel=Desktop&playerManufacturer=Audible' % (player_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
if sys.platform == 'win32':
|
chromedriver_path = distutils.spawn.find_executable('chromedriver')
|
||||||
chromedriver_path = "chromedriver.exe"
|
|
||||||
else:
|
|
||||||
chromedriver_path = "./chromedriver"
|
|
||||||
|
|
||||||
driver = webdriver.Chrome(chrome_options=opts,
|
driver = webdriver.Chrome(chrome_options=opts,
|
||||||
executable_path=chromedriver_path)
|
executable_path=chromedriver_path)
|
||||||
|
Loading…
Reference in New Issue
Block a user