python中如何将list转换成字符串?
先在命令行中下载一个selenium库:
python -m pip install selenium
然后使用selenium中的webdriver来进行模拟网页点击:
from selenium import webdriverfrom selenium.common.exceptions import TimeoutExceptionfrom selenium.webdriver.chrome.options import Optionsfrom selenium.webdriver.support.ui import Selectfrom selenium.webdriver.support.ui import WebDriverWaitsel=webdriver.Chrome() #也可换成Ie(),Firefox()等element=sel.find_element() #在网页源码中查找元素,具体可参考
http://www.aichengxu.com/python/11949.htm
element.click() #模拟对元素进行点击如果你是Chrome用户,需要手动下载一个chromedriver.exe,这里附上,把它放入系统Path路径任意一个文件夹中即可
Copyright © 广州京杭网络科技有限公司 2005-2025 版权所有 粤ICP备16019765号
广州京杭网络科技有限公司 版权所有