Spaces:
Sleeping
Sleeping
Commit ·
b72272e
1
Parent(s): 8d46355
add packages to download chromium-driver
Browse files- download_video.py +1 -8
- packages.txt +1 -0
download_video.py
CHANGED
|
@@ -3,8 +3,6 @@ from selenium.webdriver.common.by import By
|
|
| 3 |
from selenium.webdriver.common.keys import Keys
|
| 4 |
from selenium.webdriver.support.ui import WebDriverWait
|
| 5 |
from selenium.webdriver.support import expected_conditions as EC
|
| 6 |
-
from selenium.webdriver.chrome.service import Service
|
| 7 |
-
from webdriver_manager.chrome import ChromeDriverManager
|
| 8 |
|
| 9 |
import requests
|
| 10 |
|
|
@@ -15,12 +13,7 @@ def download_mp3_selenium(youtube_url):
|
|
| 15 |
options.add_argument("--no-sandbox")
|
| 16 |
options.add_argument('--disable-dev-shm-usage')
|
| 17 |
|
| 18 |
-
|
| 19 |
-
# driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options)
|
| 20 |
-
# Explicitly set the path to ChromeDriver
|
| 21 |
-
driver = webdriver.Chrome(service=Service("/usr/local/bin/chromedriver"), options=options)
|
| 22 |
-
|
| 23 |
-
# driver = webdriver.Chrome(options=options)
|
| 24 |
|
| 25 |
# Set up WebDriverWait (with a timeout of 10 seconds)
|
| 26 |
wait = WebDriverWait(driver, 10)
|
|
|
|
| 3 |
from selenium.webdriver.common.keys import Keys
|
| 4 |
from selenium.webdriver.support.ui import WebDriverWait
|
| 5 |
from selenium.webdriver.support import expected_conditions as EC
|
|
|
|
|
|
|
| 6 |
|
| 7 |
import requests
|
| 8 |
|
|
|
|
| 13 |
options.add_argument("--no-sandbox")
|
| 14 |
options.add_argument('--disable-dev-shm-usage')
|
| 15 |
|
| 16 |
+
driver = webdriver.Chrome(options=options)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
# Set up WebDriverWait (with a timeout of 10 seconds)
|
| 19 |
wait = WebDriverWait(driver, 10)
|
packages.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
chromium-driver
|