随笔分类 -  python+selenium

记录
摘要:1. 进入"Dashboard"界面,点击左侧"构建执行状态" 2. 点击列表设置图标 3. 勾选"Environment variables",点击"新增",输入环境变量【名称和python路径】,点击保存 4. 查看python环境变量 阅读全文
posted @ 2022-08-31 18:11 墨振 阅读(514) 评论(0) 推荐(0)
摘要:#!/usr/bin/python # -*- coding: UTF-8 -*- """ @author: Roc-xb """ import re #导入re # 去除图片文字内空格、特殊字符 with open("E:\\test001\\001test.txt", "r") as f: # 阅读全文
posted @ 2022-08-31 17:42 墨振 阅读(509) 评论(0) 推荐(0)
摘要:两种方法 1. 第一种方法 from PIL import Image import pytesseract import re #导入re import os import pytesseract Image = Image.open(r'E:\\test001\\12345.jpg') # 打开 阅读全文
posted @ 2022-08-31 17:36 墨振 阅读(225) 评论(0) 推荐(0)
摘要:安装 pip.exe install 包名 pip.exe install selenium pip.exe install ddt pip.exe install requests 卸载 pip.exe uninstall 包名 阅读全文
posted @ 2020-11-21 13:28 墨振 阅读(136) 评论(0) 推荐(0)
摘要:元素找不到 1.考虑iframe 和句柄的切换 2.元素定位技术不熟练(因有些元素是随机的,只适用当前页面,刷新页面后该元素可能会自动切换,需学会手动写元素), 3.等待添加是否合理 阅读全文
posted @ 2020-11-21 00:34 墨振 阅读(97) 评论(0) 推荐(0)
摘要:1.报错: AttributeError: 'list' object has no attribute 'click' 原因:应是find_element_by 不是 find_elements_by 去除elements中的s find_element 和 find_elements 的区别 使 阅读全文
posted @ 2020-11-19 13:20 墨振 阅读(972) 评论(0) 推荐(0)
摘要:谷歌驱动包:http://chromedriver.storage.googleapis.com/index.html 例: 下载后解压,将 chromedriver.exe复制到下面两个目录中: Chrome目录:比如C:\Program Files (x86)\Google\Chrome\App 阅读全文
posted @ 2020-11-18 13:21 墨振 阅读(116) 评论(0) 推荐(0)
摘要:1.IE浏览器 IE11 与 IE8 器驱动:https://pan.baidu.com/s/1W12csG54HtxUFtxM8QwQig 密码:zhen 2.火狐浏览器 火狐浏览器(59.03)版本+驱动文件:https://pan.baidu.com/s/1aZtVf0VXqdKZkwYERr 阅读全文
posted @ 2020-11-18 10:00 墨振 阅读(448) 评论(0) 推荐(0)
摘要:1.安装python 文件位置:https://pan.baidu.com/s/1GIrlU9NnzCtWyf9T7O1O9g 密码:zhen 安装教程:https://pan.baidu.com/s/1ORIynuZm1hBrpWwJ8h0ZZw 密码:zhen 2.安装selenium (1). 阅读全文
posted @ 2020-11-17 15:35 墨振 阅读(86) 评论(0) 推荐(0)