📜  使用登录 python selenium 抓取网站 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:36.230000             🧑  作者: Mango

代码示例1
driver.get("https://news.ycombinator.com/login")

login = driver.find_element_by_xpath("//input").send_keys(USERNAME)
password = driver.find_element_by_xpath("//input[@type='password']").send_keys(PASSWORD)
submit = driver.find_element_by_xpath("//input[@value='login']").click()