![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
zbguolei
这个作者很懒,什么都没留下…
展开
-
使用Python完成自动录入信息
代码如下:from selenium import webdriverimport timebrowser = webdriver.Chrome(r'C:\Users\Administrator\Desktop\chromedriver.exe')headers = { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko...原创 2021-05-03 09:06:22 · 1725 阅读 · 0 评论 -
pyautogui的初步使用
PyAutoGUI是一个纯Python的GUI自动化工具,其目的是可以用程序自动控制鼠标和键盘操作,支持多平台。一、安装pip install pyautogui二、基本使用#显示屏幕的宽度和高度pyautogui.size()#获取鼠标位置pyautogui.position()#移动鼠标,duration表示持续时间(移动鼠标所需的秒数)pyautogui.moveTo(100,100,duration=0.25)#在当前位置左击鼠标pyautogui.c...原创 2021-01-23 16:51:03 · 215 阅读 · 0 评论 -
IDLE扩展实现清屏ClearWindow
在IDLE中要实现清屏的功能,可通过以下步骤完成功能扩展: 一、下载https://bugs.python.org/file14116/ClearWindow.py 复制代码保存成为ClearWindow.py文件class ClearWindow: menudefs = [ ('options', [None, ('Clear Shell Window', '<<clear-window>>'), ]..原创 2020-12-29 18:53:32 · 615 阅读 · 0 评论 -
Python学习资料自我总结
Python3的安装一、下载Python3.7二、安装程序,勾选添加到路径三、安装完成四、首次运行,无法启动,出现下面的提示五、把C:\Windows\SysWOW64的api-ms-win-crt-runtime-l1-1-0.dll删除掉六、安装下面的补丁Python_PIP更换国内源和常用命令#pip版本升级python -m pip install --upgrade pip -i https://pypi....原创 2020-12-05 07:12:45 · 172 阅读 · 0 评论 -
使用selenium登录网站并爬取数据保存到excel
使用selenium模拟登录到网站后,利用requests爬取数据,用bs4解析数据,用xlwt保存到excel。自定义了2个函数:getData()用于获取数据,使用for循环获取多个页面的数据,解析后的数据保存到列表中;saveData(datalist, savepath)用于保存数据,参数datalist是保存的数据,参数savepath是保存的路径,写入数据时使用了双重循环。from selenium import webdriverimport timeimport request原创 2020-11-23 20:08:46 · 3410 阅读 · 0 评论