python
Sarah.J
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
出现“cannot identify image file ‘/Users//.DS_Store‘”解决办法
image转为PDF时遇到的报错 采用的做法是 cd 到这个文件夹 sudo find ./ -name ".DS_Store" -depth -exec rm {} \;原创 2021-08-08 13:44:56 · 1036 阅读 · 0 评论 -
Python爬取图片后快速存储
不用再费时间另存为图片了 enn…真香 import requests import os root = "/Users/Downloads/yuwen/" for i in range(1,135): url = "https://ha.huatu.com/zt/dzkb/yuwen/6s/images/{}.jpg".format(i) path = root + url.split('/')[-1] try: if not os.path.exists(root)原创 2021-08-08 13:30:14 · 274 阅读 · 1 评论 -
Python 一堆图片转为PDF
废话不多说,直接上代码 import os from fpdf import FPDF pdf = FPDF() path_picture = "/Users/pc/Downloads/yuwen/" path_docx = "/Users/pc/Downloads/yuwendoc/" imageList = [i for i in os.listdir(path_picture)] # 排序规则 get_key = lambda i: int(i.split('.')[0]) pdf.add_p原创 2021-08-08 13:26:35 · 204 阅读 · 0 评论 -
pyinstaller 打包时包含子文件资源
使用pyinstaller打包项目时,txt文件和img文件并没有随同打包,查阅了很多文章,发现有一位大佬写的文章解决了问题 https://blog.youkuaiyun.com/polyhedronx/article/details/81740818 感谢转载 2020-05-28 22:07:00 · 1741 阅读 · 0 评论 -
Selenium配合chromedriver打包为exe后运行时提示Message chromedriver executable needs to be in PATH
Selenium配合chromedriver提示“Message: ‘chromedriver’ executable needs to be in PATH 使用pyinstaller打包exe文件夹后,执行程序报错,如图 网上查阅了好多资料,尝试了多种办法 1、chromedriver 版本是否和本机浏览器位置相同(具体对应版本请百度) 2、chromedriver 放在chrome浏览器同级位置(默认安装,位置应该都相同) C:\Program Files (x86)\Google\Chrome\原创 2020-05-28 22:01:44 · 2229 阅读 · 0 评论
分享