05 2021 档案

摘要:python判断文件和文件夹是否存在、创建文件夹 >>> import os >>> os.path.exists('d:/assist') True >>> os.path.exists('d:/assist/getTeacherList.py') True >>> os.path.isfile( 阅读全文
posted @ 2021-05-31 16:56 拷贝达人 阅读(946) 评论(0) 推荐(0) 编辑
摘要:import fitz import os import datetime from PyPDF2 import PdfFileReader, PdfFileWriter # 导入相关的库 from PIL import Image import shutil class PDF(): def pd 阅读全文
posted @ 2021-05-31 16:54 拷贝达人 阅读(104) 评论(0) 推荐(0) 编辑
摘要:selenium+python配置chrome浏览器的选项 1. 背景 在使用selenium浏览器渲染技术,爬取网站信息时,默认情况下就是一个普通的纯净的chrome浏览器,而我们平时在使用浏览器时,经常就添加一些插件,扩展,代理之类的应用。相对应的,当我们用chrome浏览器爬取网站时,可能需要 阅读全文
posted @ 2021-05-17 11:45 拷贝达人 阅读(2485) 评论(0) 推荐(0) 编辑
摘要:#pyperclip模块中的copy() paste()可以向计算机的剪贴板发送文本,或从它接受文本。# 将程序的输出发送到剪贴板,使它容易粘贴到邮件,文字处理程序或者其他软件中import pyperclip #把hello world 复制到计算机的剪切板pyperclip.copy('hell 阅读全文
posted @ 2021-05-17 11:23 拷贝达人 阅读(1599) 评论(0) 推荐(1) 编辑
摘要:os模块下有两个函数: os.walk() os.listdir() # -*- coding: utf-8 -*- import os def file_name(file_dir): for root, dirs, files in os.walk(file_dir): print(root) 阅读全文
posted @ 2021-05-13 23:16 拷贝达人 阅读(3283) 评论(0) 推荐(0) 编辑
摘要:sorted 语法: sorted(iterable, key=None, reverse=False) 参数说明: iterable -- 可迭代对象。 key -- 主要是用来进行比较的元素,只有一个参数,具体的函数的参数就是取自于可迭代对象中,指定可迭代对象中的一个元素来进行排序。 rever 阅读全文
posted @ 2021-05-11 15:28 拷贝达人 阅读(3323) 评论(0) 推荐(1) 编辑
摘要:# 设置长 document.getElementsByClassName('currencytables__TableScroller-xlq26m-1 eLRiRK')[0].style.maxHeight = '15000px' # 设置宽 document.getElementsByClas 阅读全文
posted @ 2021-05-07 12:44 拷贝达人 阅读(47) 评论(0) 推荐(0) 编辑
摘要:# 键盘全选操作from selenium.webdriver.common.keys import Keysdriver.find_element_by_css_selector('#key-demo').send_keys(Keys.CONTROL,'a')time.sleep(2)# 键盘的复 阅读全文
posted @ 2021-05-06 10:24 拷贝达人 阅读(986) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示