摘要: import io img = Image.open(img_path, mode='r') imgByteArr = io.BytesIO() img.save(imgByteArr, format='JPEG') imgByteArr = imgByteArr.getvalue() 阅读全文
posted @ 2023-01-04 22:13 三省吾身~ 阅读(330) 评论(0) 推荐(0) 编辑
摘要: https://zhuanlan.zhihu.com/p/181525305 https://www.jb51.net/article/78855.htm https://blog.csdn.net/xujin0/article/details/100524073 阅读全文
posted @ 2023-01-04 21:36 三省吾身~ 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 正则常用用法和基本规则 https://blog.csdn.net/ZYC88888/article/details/98479629 阅读全文
posted @ 2022-12-15 14:40 三省吾身~ 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 1 # coding: utf-8 2 import html 3 import json 4 import os 5 import re 6 import sys 7 from datetime import datetime 8 from pprint import pprint 9 10 im 阅读全文
posted @ 2021-09-09 11:40 三省吾身~ 阅读(362) 评论(0) 推荐(0) 编辑
摘要: 每天感觉最有意思的蚀刻机就是工作结束后,腾出来一点时间鼓捣一些自己喜欢的东西,今天遇到测试一个模块上的问题,需要数据来校验,但是现在没有需要的数据只好自己去造一些数据,但是造数据却又很慢影响效率,这里淘到了一个专门用来造假数据的模块faker,忍不住要来试用一番。 GitHub链接在这里,需要源码的 阅读全文
posted @ 2021-08-13 15:22 三省吾身~ 阅读(1562) 评论(0) 推荐(0) 编辑
摘要: 用python将ts文件转换为MP4文件作为一名光荣的程序猿,能在代码中完成的工作,我们绝不手动操作,在py文件中: import os os.system(r'copy /b E:\ts\*.ts E:\皮卡丘大侦探.mp4' ) os.system() 可以运行shell或者CMD命令此时就已经 阅读全文
posted @ 2021-08-13 15:14 三省吾身~ 阅读(807) 评论(0) 推荐(0) 编辑
摘要: 1.常用参数: # options.add_argument('--headless') # 开启无界面模式 # options.add_argument("--disable-gpu") # 禁用gpu 谷歌文档提到需要加上这个属性来规避bug # options.add_argument('-- 阅读全文
posted @ 2021-08-11 11:41 三省吾身~ 阅读(459) 评论(0) 推荐(0) 编辑
摘要: from selenium.webdriver import Chrome from selenium.webdriver.common.keys import Keys web = Chrome() # web.get('http://www.lagou.com') # # # 浏览器窗口最大化 阅读全文
posted @ 2021-08-11 11:36 三省吾身~ 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 本文地址:http://blog.csdn.net/wusuopubupt/article/details/8817826 by wusuopubupt 提示:请直接按CTRL+F搜索您要查找的转义字符。 常用表: No. 文字表記 10進表記 16進表記 文字 Comment 001 " 阅读全文
posted @ 2021-08-10 13:42 三省吾身~ 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 最近在用python抓取网页数据时,经常遇到一些html转义字符(也叫html字符实体),例如<> 等。字符实体一般是为了表示网页中的预留字符,比如 > 用 &gt; 表示,防止被浏览器认为是标签,具体参考w3school的HTML 字符实体。虽然很有用,但是它们会极度影响对于网页数据的解析。 比方 阅读全文
posted @ 2021-08-10 13:38 三省吾身~ 阅读(272) 评论(0) 推荐(0) 编辑