01 2023 档案
chrome和firefox driver使用代理
摘要:chrome chromedriver使用代理示例 from selenium import webdriver from selenium.webdriver import DesiredCapabilities option = webdriver.ChromeOptions() caps =
阅读全文
解决DevToolsActivePort file doesn't exist
摘要:今天遇到个小问题:selenium 启动 chrome crash,报错:DevToolsActivePort file doesn't exist。 在option中添加一下几行: option = webdriver.ChromeOptions() option.add_argument('--
阅读全文
selenium driver add_cookie正确姿势
摘要:需求 seo给了个开发小需求,查询搜索引擎站点后台的索引量 需求分析 难点在于怎么绕过登录 技术选型 使用selenium+firefox+geckodriver执行抓取 技术难点解析 获取cookie # 登录目标网站后,请求目标url复制请求头Cookie cookies = """xxx1=x
阅读全文