-1
需要在点击一个显示我需要的表单的按钮后,用BeautifulSoup来取消网站的内容。我使用Selenium来点击按钮。 换句话说,在我做出一些改变其默认内容的操作后,我不知道如何取消网站。在对其进行一些更改之后刮去网站
我使用此代码点击按钮:
from bs4 import BeautifulSoup
from selenium import webdriver
site= "http://example.com"
dr = webdriver.PhantomJS('./phantomjs')
dr.get(site)
loginButton = dr.find_element_by_xpath("//button[@ID='someId']")
loginButton.click()