Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
@@ -8,12 +8,16 @@ from selenium.webdriver.chrome.service import Service
|
|
8 |
import json
|
9 |
import gradio as gr
|
10 |
from gradio_client import Client
|
|
|
11 |
|
12 |
def scrape_data(amazon_url):
|
13 |
service = Service(executable_path='chromedriver')
|
14 |
chrome_options = Options()
|
15 |
-
chrome_options.add_argument(
|
16 |
-
|
|
|
|
|
|
|
17 |
|
18 |
driver.get(amazon_url)
|
19 |
|
|
|
8 |
import json
|
9 |
import gradio as gr
|
10 |
from gradio_client import Client
|
11 |
+
import chromedriver_autoinstaller
|
12 |
|
13 |
def scrape_data(amazon_url):
|
14 |
service = Service(executable_path='chromedriver')
|
15 |
chrome_options = Options()
|
16 |
+
chrome_options.add_argument('--no-sandbox')
|
17 |
+
chrome_options.add_argument('--disable-dev-shm-usage')
|
18 |
+
|
19 |
+
chromedriver_autoinstaller.install()
|
20 |
+
driver = webdriver.Chrome(options=chrome_options)
|
21 |
|
22 |
driver.get(amazon_url)
|
23 |
|