本文最后更新于 2024-07-26T20:49:51+08:00
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| from selenium import webdriver driver = webdriver.Chrome() url="https://www.baidu.com" driver.get(url) input=driver.find_element(by="id",value="su") print(input.get_attribute('class')) print(input.tag_name)
a=driver.find_element(by="link text",value="新闻") print(a.text)
driver.quit()
|
selenium_信息交互
https://ianwusb.blog/2024/07/26/selenium_信息交互/