Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -32,18 +32,14 @@ from selenium.webdriver.support.ui import WebDriverWait
|
|
32 |
from selenium.webdriver.support import expected_conditions as EC
|
33 |
|
34 |
#Settings for using the driver without a UI
|
|
|
35 |
options = webdriver.ChromeOptions()
|
36 |
-
options.add_argument('--headless')
|
37 |
options.add_argument('--no-sandbox')
|
38 |
options.add_argument('--disable-dev-shm-usage')
|
39 |
|
40 |
-
options.add_argument("start-maximized")
|
41 |
-
options.add_argument("disable-infobars")
|
42 |
-
options.add_argument("--disable-extensions")
|
43 |
-
from selenium.webdriver.chrome.service import Service
|
44 |
-
|
45 |
# Initialize the ChromeDriver
|
46 |
-
service = Service('/usr/local/bin/chromedriver')
|
47 |
driver = webdriver.Chrome(service=service, options=options)
|
48 |
|
49 |
from wuzzuf_scraper import Wuzzuf_scrapping
|
|
|
32 |
from selenium.webdriver.support import expected_conditions as EC
|
33 |
|
34 |
#Settings for using the driver without a UI
|
35 |
+
# Set up Chrome options
|
36 |
options = webdriver.ChromeOptions()
|
37 |
+
options.add_argument('--headless') # Run in headless mode
|
38 |
options.add_argument('--no-sandbox')
|
39 |
options.add_argument('--disable-dev-shm-usage')
|
40 |
|
|
|
|
|
|
|
|
|
|
|
41 |
# Initialize the ChromeDriver
|
42 |
+
service = Service('/usr/local/bin/chromedriver') # This should work now
|
43 |
driver = webdriver.Chrome(service=service, options=options)
|
44 |
|
45 |
from wuzzuf_scraper import Wuzzuf_scrapping
|