Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -4,14 +4,16 @@ from selenium.webdriver.common.keys import Keys
|
|
| 4 |
from selenium.webdriver.common.by import By
|
| 5 |
from selenium.webdriver.support.ui import WebDriverWait
|
| 6 |
from selenium.webdriver.support import expected_conditions as EC
|
| 7 |
-
from
|
| 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(
|
| 15 |
|
| 16 |
driver.get(amazon_url)
|
| 17 |
|
|
|
|
| 4 |
from selenium.webdriver.common.by import By
|
| 5 |
from selenium.webdriver.support.ui import WebDriverWait
|
| 6 |
from selenium.webdriver.support import expected_conditions as EC
|
| 7 |
+
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("--headless")
|
| 16 |
+
driver = webdriver.Chrome(service=service, options=chrome_options)
|
| 17 |
|
| 18 |
driver.get(amazon_url)
|
| 19 |
|