赞
踩
import selenium.webdriver.chrome
import time
from selenium.webdriver.common.by import By
driver=selenium.webdriver.Chrome()
url='https://www.lifengfan.club'
driver.get(url)
driver.maximize_window()
driver.implicitly_wait(5)
driver.find_element(By.CSS_SELECTOR,'.nav>li:nth-child(4)').click()
# $('.nav navbar-nav navbar-right>li:nth-child(4)')
首先需要selenium模块
pip install selenium -i https://pypi.tuna.tsinghua.edu.cn/simple
下载谷歌driver框架
http://chromedriver.storage.googleapis.com/index.html
import selenium.webdriver.chrome
import time
from selenium.webdriver.common.by import By
driver=selenium.webdriver.Chrome()
url='https://www.lifengfan.club'
driver.get(url)
driver.maximize_window()
driver.implicitly_wait(5)
driver.find_element(By.CSS_SELECTOR,'.nav>li:nth-child(4)').click()
# $('.nav navbar-nav navbar-right>li:nth-child(4)')
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。