Python | Scrapy + Selenium模拟登录CSDN
废话 本文旨在记录selenium的一些操作实例,没啥技术含量,也没有太多概念的内容。 安装selenium pipinstallselenium 下载驱动(chromedriver) 下载前需要确认适配自己的浏览器版本 https://chromedriver.storage.googleapis.com/index.html selenium的基本用法 基本用法看官方文档,讲述的很清楚了,推荐 https://selenium-python.readthedocs.io/installation.html 常用的实例 设置浏览器不加载图片 fromseleniumimportwebdriver#设置不加载图片 chrome_opt=webdriver.ChromeOptions() prefs={ "profile.managed_default_content_settings.images":2 } chrome_opt.add_experimental_option("prefs",prefs) driver=webdriver.Chrome(chrome_options=c...