File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 2323
2424def 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
6472else :
6573 drive_download ()
You can’t perform that action at this time.
0 commit comments