Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
from selenium import webdriver
|
2 |
-
from selenium.webdriver.chrome.service import Service
|
3 |
from selenium.webdriver.chrome.options import Options
|
4 |
from selenium.webdriver.common.keys import Keys
|
5 |
from selenium.webdriver.common.by import By
|
@@ -8,14 +7,11 @@ from selenium.webdriver.support import expected_conditions as EC
|
|
8 |
from gradio_client import Client
|
9 |
import json
|
10 |
import gradio as gr
|
11 |
-
from webdriver_manager.chrome import ChromeDriverManager
|
12 |
|
13 |
def scrape_data(amazon_url):
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
driver = webdriver.Chrome(service=service, options=options)
|
19 |
|
20 |
driver.get(amazon_url)
|
21 |
|
|
|
1 |
from selenium import webdriver
|
|
|
2 |
from selenium.webdriver.chrome.options import Options
|
3 |
from selenium.webdriver.common.keys import Keys
|
4 |
from selenium.webdriver.common.by import By
|
|
|
7 |
from gradio_client import Client
|
8 |
import json
|
9 |
import gradio as gr
|
|
|
10 |
|
11 |
def scrape_data(amazon_url):
|
12 |
+
chrome_options = Options()
|
13 |
+
chrome_options.add_argument("--headless")
|
14 |
+
driver = webdriver.Chrome(options=chrome_options)
|
|
|
|
|
15 |
|
16 |
driver.get(amazon_url)
|
17 |
|