03 2022 档案
摘要:废话不多说,直接上代码 from selenium import webdriverfrom selenium.webdriver import ChromeOptionsimport timeimport refrom selenium.webdriver.support import expec
阅读全文
摘要:反屏蔽 现在很多网站都加上了对 Selenium 的检测,来防止一些爬虫的恶意爬取。即如果检测到有人在使用 Selenium 打开浏览器,那就直接屏蔽。 其大多数情况下,检测基本原理是检测当前浏览器窗口下的 window.navigator 对象是否包含 webdriver 这个属性。因为在正常使用
阅读全文
摘要:首先安装 selenium可以直接可以用pip安装。 pip install selenium 接下来安装谷歌驱动,chromedriver的安装一定要与Chrome的版本一致。 安装地址如下: 1、http://chromedriver.storage.googleapis.com/index.h
阅读全文