Aug-10-2023, 11:49 AM
(This post was last modified: Aug-10-2023, 11:49 AM by kucingkembar.)
sorry for my bad english,
i tried this since yesterday,
i tried to press a button that turn out that button is "select option",
i dont know how, but the page do nothing when i "select_by_index(1)"
this is the code
i will appreciate google keyword, google link, clue, or anything else,
please help me
EDIT : after i update the selenium, the code is working
i tried this since yesterday,
i tried to press a button that turn out that button is "select option",
i dont know how, but the page do nothing when i "select_by_index(1)"
this is the code
from selenium import webdriver from selenium.webdriver.chrome.service import Service from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import Select from bs4 import BeautifulSoup import time service = Service(executable_path=r'/usr/bin/chromedriver') options = webdriver.ChromeOptions() #options.add_argument('--headless') options.add_argument("--disable-notifications") options.add_argument('--no-sandbox') options.add_argument('--disable-dev-shm-usage') driver = webdriver.Chrome(service=service, options=options) driver.get("https://bravedown.com/id/bilibili-downloader/") print(driver.page_source) inputElement = driver.find_element(By.ID, 'link') inputElement.send_keys('https://www.bilibili.com/video/BV1ru411G7f2') inputElement.send_keys(Keys.ENTER) time.sleep(20) print(driver.page_source) soup = BeautifulSoup(driver.page_source, 'html.parser') drop_down_node = driver.find_element(By.ID, 'render_video') drop = Select(drop_down_node) drop.select_by_index(1) time.sleep(10) input("press any key to continue...") driver.quit()i don't know how i continue this code,
i will appreciate google keyword, google link, clue, or anything else,
please help me
EDIT : after i update the selenium, the code is working