python 爬虫 selenium 与 chromedriver


selenium  安装

pip install   selenium  

chromedriver  下载

https://npm.taobao.org/mirrors/chromedriver?spm=a2c6h.14029880.0.0.735975d7UtIpWk

 

 

代码   模拟浏览器操作&自动化测试

#encodeing utf-8
import requests
from selenium import webdriver
import time
driver_path=r"E:\\tool\\python\\chromedriver\\chromedriver.exe"
driver=webdriver.Chrome(executable_path=driver_path)
driver.get("https://www.baidu.com/")
time.sleep(5)
driver.close()


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM