12 2020 档案

摘要:安装docx模块 pip3 install python-docx 读取word整文 from docx import Document doc=Document("./a.docx") for p in doc.paragraphs: print(p.text) 简单实例1 # word_1.py 阅读全文
posted @ 2020-12-28 13:44 豆浆D 阅读(1576) 评论(0) 推荐(0) 编辑
摘要:使用 time 模块的 strftime 方法来格式化日期 time.strftime(format[, t]) 实例 import time # 格式化成2016-03-20 11:45:39形式 time1 = time.strftime("%Y-%m-%d %H:%M:%S", time.lo 阅读全文
posted @ 2020-12-28 11:18 豆浆D 阅读(2871) 评论(0) 推荐(0) 编辑
摘要:xpath是一种在xm文档中定位的语言,详细简介,请自行参照百度百科,本文主要总结一下xpath的使用方法,个人看法,如有不足和错误,敬请指出。 注意:xpath的定位 同一级别的多个标签 索引从1开始 而不是0 1. 绝对定位: 此方法最为简单,具体格式为 xxx.find_element_by_ 阅读全文
posted @ 2020-12-15 14:14 豆浆D 阅读(288) 评论(0) 推荐(0) 编辑

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