当前位置:网站首页>某宝模拟登录,减少二次验证的方法
某宝模拟登录,减少二次验证的方法
2022-07-28 03:11:00 【范之度】
在爬某宝的时候,模拟点击打开新的页面往往需要重新登陆,这时可以通过采用本地打开一个浏览器,设置监听端口,在该端口下模拟浏览器,这样浏览器会记住所有的用户行为,只要登陆过一次就不必重复登录。
步骤一,直接在你正在使用的(而非selenium调用的,通过快捷方式进去)chrome.exe所在位置打开命令行输入
chrome.exe --remote-debugging-port=9222
或者来说使用py文件:
from selenium import webdriver
import time
chromeOptions = webdriver.ChromeOptions()
chromeOptions.add_argument('--remote-debugging-port=9222')
driver = webdriver.Chrome(options = chromeOptions)
while True:
time.sleep(100)!!!这里一定要你selenium模拟的chrome.exe版本跟你要固定端口正在使用的chrome.exe相同,然后在使用selenium的文件中加入如下代码:
from selenium import webdriver
chromeOptions = webdriver.ChromeOptions()
chromeOptions.add_experimental_option("debuggerAddress", "127.0.0.1:9222")
driver = webdriver.Chrome(options = chromeOptions)边栏推荐
- 数字孪生技术驱动智能工厂减负赋能提升运维效益
- 机器人开发--丝杠与导轨
- [download file] uniapp develops small programs, downloads files and saves them locally
- Summary of concurrent programming interview questions
- 嵌入式数据库--SQLite
- 并发编程面试题总结
- How to use JDBC to operate database
- 53. Maximum subarray maximum subarray sum
- SSM integration (integrated configuration)
- "Introduction to engineering electromagnetic field" after class exercises with answers
猜你喜欢

Contour detection based on OpenCV (3)

Summary of concurrent programming interview questions

53. Maximum subarray maximum subarray sum

4天Excel实战训练营,0.01元特惠仅三天,赠200套学习资料包
![[download file] uniapp develops small programs, downloads files and saves them locally](/img/0f/4963178e44f58ad6e3097844bb6ffd.png)
[download file] uniapp develops small programs, downloads files and saves them locally

PCB丝印如何摆?请查收这份手册!

静态博客搭建工具汇总

bp svm的缺陷检测 树叶缺陷 叶片缺陷检测的系统设计

SQL Server备份数据库的方法

Redis memory recycling
随机推荐
How to reinstall win11 system with one click
GNU 通用公共许可证 v2.0 GNU GENERAL PUBLIC LICENSE
【SAML SSO解决方案】上海道宁为您带来SAML for ASP.NET/SAML for ASP.NET Core下载、试用、教程
Redis实现分布式锁
2022-07-27:小红拿到了一个长度为N的数组arr,她准备只进行一次修改, 可以将数组中任意一个数arr[i],修改为不大于P的正数(修改后的数必须和原数不同), 并使得所有数之和为X的倍数。
Version compatibility issues
动态内存管理中的malloc、free、calloc、realloc动态内存开辟函数
Unity背包系统
The open source of "avoiding disease and avoiding medicine" will not go far
Softek Barcode Reader 9.1.5
C语言实现动态版本的通讯录
golang gorm查询任意字段的组装方法
工程地质实习-工程地质 题集
容器相关的概念
Four methods of closing forms in C #
How to arrange PCB screen printing? Please check this manual!
When QML uses layout layout, a large number of < unknown file >: QML qquicklayoutattached: binding loop detected for property circular binding warnings appear
叶子识别 颜色的特征提取 缺陷检测等
xctf攻防世界 Web高手进阶区 unserialize3
SSM integration (integrated configuration)