当前位置:网站首页>某宝模拟登录,减少二次验证的方法
某宝模拟登录,减少二次验证的方法
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)边栏推荐
猜你喜欢

STM32 RT-Thread虚拟文件系统挂载操作

Methods of SQL server backup database

如何解决mysql深分页问题

Redis经典面试题总结

Tungsten Fabric SDN — BGP as a Service

【5G NR】RRC Reject解析

Summary of redis classic interview questions

“讳疾忌医”的开源走不远

Engineering Geology Practice - engineering geology problem set

max_pool2d(): argument ‘input‘ (position 1) must be Tensor, not NoneType
随机推荐
⽇志分析⼯具(Splunk)
Hotel VR panoramic display shooting provides more opportunities for cooperation and negotiation
Embedded database -- SQLite
Methods of SQL server backup database
容器相关的概念
The open source of "avoiding disease and avoiding medicine" will not go far
超好看的Nteam官网PHP程序源码
"Introduction to engineering electromagnetic field" after class exercises with answers
Defect detection of BP SVM system design of leaf defect detection
Contour detection based on OpenCV (3)
Data Lake (XVII): Flink and iceberg integrate datastream API operations
On weight decay and discarding method
力扣(LeetCode)208. 实现 Trie (前缀树)(2022.07.27)
Win11黑色桌面背景如何解决?
bp svm的缺陷检测 树叶缺陷 叶片缺陷检测的系统设计
QFileDevice、QFile、QSaveFile、QTemporaryFile
When a dialog box pops up, the following form is not available
Robot development -- lead screw and guide rail
嵌入式数据库--SQLite
Talk about the speech synthesis function of Baidu University of science and technology news Feiyun Zhisheng