摘要: from selenium import webdriverfrom selenium.webdriver.common.by import Byfrom PIL import Imageimport osimport pytesseractimport timefrom applitools.se 阅读全文
posted @ 2025-07-14 17:41 爱我所爱-333 阅读(13) 评论(0) 推荐(0)
摘要: 一、python实现读取验证码from PIL import Imageimport pytesseractimport osimport requestsimport jsonimport base64# 获取当前目录dir = os.getcwd()# 请求图片验证码result = reque 阅读全文
posted @ 2025-07-11 10:03 爱我所爱-333 阅读(145) 评论(0) 推荐(0)
摘要: # coding=utf-8# 1.先设置编码,utf-8可支持中英文,如上,一般放在第一行# 2.导入unittest模块import HTMLTestRunnerCNimport unittestimport osfrom email.mime.text import MIMETextfrom 阅读全文
posted @ 2023-11-07 13:17 爱我所爱-333 阅读(51) 评论(0) 推荐(0)
摘要: 1、 描述: 今天想抓取一个网站跳转到另外一个页面的数据,结果一直报元素获取不到,用了xpath、id、class都没办法,找了很久的解决方案,增加如下二行即可成功: # 获取所有的窗口,句柄all_handles = driver.window_handles# 切换到新打开的窗口driver.s 阅读全文
posted @ 2021-04-22 11:09 爱我所爱-333 阅读(663) 评论(0) 推荐(0)
摘要: # coding:utf-8from locust import task, HttpUser, betweenimport osclass WebUser(HttpUser): # 任务集 用户行为脚本 wait_time = between(0, 0) #(思考时间) @task() # 权重 阅读全文
posted @ 2020-08-25 15:22 爱我所爱-333 阅读(317) 评论(0) 推荐(0)
摘要: import timeimport osimport sysdef merge_hosts(): def read_hosts(filename): res = [] with open(filename, 'r') as f: for line in f.readlines(): ls = lin 阅读全文
posted @ 2020-03-09 16:36 爱我所爱-333 阅读(301) 评论(0) 推荐(0)
摘要: from locust import Locust, TaskSet, task, between, eventsfrom gevent import monkeyfrom websocket import create_connectionimport randomimport stringimp 阅读全文
posted @ 2020-03-09 16:24 爱我所爱-333 阅读(1646) 评论(0) 推荐(0)
摘要: from locust import HttpLocust, TaskSet, task, betweenimport queueimport xlrdclass Login(TaskSet): @task def index(self): try: global data_result data_ 阅读全文
posted @ 2020-03-09 16:16 爱我所爱-333 阅读(627) 评论(0) 推荐(0)
摘要: 1. linux环境安装 安装依赖组件: (1) yum install -y gcc (2) yum -y install zlib* (3) yum install libffi-devel 2. 查看当前python版本号 (1) python --version 当前为2.7,我们升级比较新 阅读全文
posted @ 2020-01-06 15:41 爱我所爱-333 阅读(1778) 评论(0) 推荐(0)
摘要: windows7 机器最大连接数: 1. Win+R运行regedit; 2. 找到HKEY_LOCAL_MACHINESYSTEM\CurrentControlSet\Services\Tcpip\Parameters; 3. 在右侧面板中找到EnableConnectionRateLimitin 阅读全文
posted @ 2019-12-25 15:32 爱我所爱-333 阅读(965) 评论(0) 推荐(0)