Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -32,21 +32,19 @@ from selenium.webdriver.support.ui import WebDriverWait
|
|
32 |
from selenium.webdriver.support import expected_conditions as EC
|
33 |
from selenium.webdriver.chrome.service import Service
|
34 |
|
35 |
-
|
36 |
-
import os
|
37 |
-
import platform
|
38 |
import requests
|
|
|
39 |
import zipfile
|
40 |
-
import
|
41 |
-
|
42 |
|
43 |
-
#
|
44 |
chrome_version = subprocess.getoutput("google-chrome --version")
|
45 |
-
chrome_version_number = chrome_version.split()[-1]
|
46 |
|
47 |
# Construct the download URL
|
48 |
url = f"https://chromedriver.storage.googleapis.com/{chrome_version_number}/chromedriver_{platform.system().lower()}64.zip"
|
49 |
|
|
|
50 |
response = requests.get(url)
|
51 |
|
52 |
# Check if the download was successful
|
|
|
32 |
from selenium.webdriver.support import expected_conditions as EC
|
33 |
from selenium.webdriver.chrome.service import Service
|
34 |
|
|
|
|
|
|
|
35 |
import requests
|
36 |
+
import platform
|
37 |
import zipfile
|
38 |
+
import os
|
|
|
39 |
|
40 |
+
# Check Chrome version
|
41 |
chrome_version = subprocess.getoutput("google-chrome --version")
|
42 |
+
chrome_version_number = chrome_version.split()[-1] # Extract only the version number
|
43 |
|
44 |
# Construct the download URL
|
45 |
url = f"https://chromedriver.storage.googleapis.com/{chrome_version_number}/chromedriver_{platform.system().lower()}64.zip"
|
46 |
|
47 |
+
# Download ChromeDriver
|
48 |
response = requests.get(url)
|
49 |
|
50 |
# Check if the download was successful
|