Skip to content

Commit 471cb14

Browse files
authored
Update raspamb.py
1 parent 6b4b792 commit 471cb14

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

raspamb.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,20 @@
2323

2424
def drive_download():
2525
version = requests.get("http://chromedriver.storage.googleapis.com/LATEST_RELEASE").text
26-
zipp = requests.get(f"https://chromedriver.storage.googleapis.com/{version}/chromedriver_win32.zip")
26+
27+
if platforman.system() == "Windows":
28+
zipp = requests.get(f"https://chromedriver.storage.googleapis.com/{version}/chromedriver_win32.zip")
29+
else:
30+
zipp = requests.get(f"https://chromedriver.storage.googleapis.com/{version}/chromedriver_linux64.zip")
2731

2832
with open("chromedriver.zip", "wb") as r:
2933
r.write(zipp.content)
30-
31-
os.system("tar -xf chromedriver.zip")
34+
35+
if platforman.system() == "Windows":
36+
os.system("tar -xf chromedriver.zip")
37+
else:
38+
os.system("unzip chromedriver.zip")
39+
3240
os.remove("chromedriver.zip")
3341

3442

@@ -59,7 +67,7 @@ def links_zippyshare():
5967
return lista_com_links
6068

6169

62-
if os.path.isfile("chromedriver.exe"):
70+
if os.path.isfile("chromedriver.exe") or os.path.isfile("chromedriver") :
6371
pass
6472
else:
6573
drive_download()

0 commit comments

Comments
 (0)