摘要: ##时间字符串 时间元组 时间戳 ⭐※(这个是转换之间的概念) 2022/05/01 00:00:00的转换: 时间字符串(2022/05/01 00:00:00) 时间元组 (time.struct_time(tm_year=2022, tm_mon=5, tm_mday=1, tm_hour=0 阅读全文
posted @ 2022-04-19 20:58 猴年马月 阅读(1099) 评论(0) 推荐(0) 编辑
摘要: python屏幕xpath元素被遮挡了,可以使用滚轮,但是又不懂用滚轮,可以用以下方法 from selenium import webdriver driver.execute_script("window.scrollTo(0,5000)")#向下滚动5000的位置 driver.execute 阅读全文
posted @ 2022-03-15 17:42 猴年马月 阅读(139) 评论(0) 推荐(0) 编辑
摘要: format用法我理解成了"占位符" Province='广东省' city='广州市' township='白云区' print("省区:{0},市区:{1},乡镇:{2}".format(Province, city, township)) #注意是.format 不是逗号 运行结果: >>>省 阅读全文
posted @ 2022-02-22 09:29 猴年马月 阅读(73) 评论(0) 推荐(0) 编辑
摘要: d: #项目所在的盘 cd 项目 #项目所在的文件夹 pyinstaller -F xxx.py #项目叫什么名字xxx.py 阅读全文
posted @ 2022-01-11 17:45 猴年马月 阅读(28) 评论(0) 推荐(0) 编辑
摘要: from datetime import datetime now = datetime.now() print(now.strftime('%Y-%m-%d')) #2022-01-11 年月日 print(now.strftime('%Y-%m-%d %H:%M:%S')) #2022-01-1 阅读全文
posted @ 2022-01-11 11:23 猴年马月 阅读(154) 评论(0) 推荐(0) 编辑