会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
wstong2052
博客园
首页
新随笔
管理
上一页
1
2
3
4
5
6
7
8
下一页
2024年2月28日
doc88图片下载
摘要: 先加载图片,然后打开浏览器控制台 // 查询所有div标签 let divs = document.querySelectorAll('div'); let imgCanvas = document.querySelector('#pageContainer').querySelectorAll('
阅读全文
posted @ 2024-02-28 23:00 wstong
阅读(60)
评论(0)
推荐(0)
2024年2月22日
chrome插件 - storage的使用
摘要: manifest.json "permissions": [ "storage" ] popup.js var data = { "url": "http://127.0.0.1" }; chrome.storage.local.set({ "data": data }, function(){ c
阅读全文
posted @ 2024-02-22 23:00 wstong
阅读(400)
评论(0)
推荐(0)
2024年2月15日
python - flask wsgi
摘要: 直接使用flask自带的wsgi,关闭debug模式会出现以下警告 from flask import Flask app = Flask(__name__, static_folder="./static") app.run(host="0.0.0.0", port=8080, debug=Fal
阅读全文
posted @ 2024-02-15 23:06 wstong
阅读(171)
评论(0)
推荐(0)
2023年12月19日
python - 压缩word图片大小
摘要: 主要分为3个步骤,解压docx文件,压缩图片,压缩文件,需要用到zipfile和pillow 1. 解压docx文件 import zipfile zip_file = zipfile.ZipFile("./test.docx") zip_file.extractall("./test") zip_
阅读全文
posted @ 2023-12-19 21:19 wstong
阅读(111)
评论(0)
推荐(0)
2023年12月4日
python - 取消 Word 文档编辑限制
摘要: 1. word格式转换 先将word转换为xml格式,路径需要绝对路径 from win32com import client import os def doc2docx(path): word = client.Dispatch("Word.Application") doc = word.Do
阅读全文
posted @ 2023-12-04 12:08 wstong
阅读(149)
评论(0)
推荐(0)
2023年11月29日
python - requests上传文件MultipartEncoder
摘要: 1. requests_toolbelt 先安装requests_toolbelt pip install requests_toolbelt 上传实例 import requests from requests_toolbelt import MultipartEncoder upload_url
阅读全文
posted @ 2023-11-29 10:28 wstong
阅读(546)
评论(0)
推荐(0)
2023年11月3日
python - 文件夹整理
摘要: 将当前文件夹的文件根据创建时间进行整理 # 整理当前文件夹 import time import os import shutil # 将旧文件复制到新路径 def cutFile(fileName): if os.path.isdir(fileName) == True: return if fi
阅读全文
posted @ 2023-11-03 10:37 wstong
阅读(31)
评论(0)
推荐(0)
2023年11月2日
python - pdf密码暴力破解
摘要: 这里只做简单的纯6位数字的密码的破解 import PyPDF2 from tqdm import trange PDFfile = "test.pdf" pdf_obj = open(PDFfile, "rb") pdf_reader = PyPDF2.PdfReader(pdf_obj) for
阅读全文
posted @ 2023-11-02 08:13 wstong
阅读(424)
评论(0)
推荐(0)
2023年10月16日
python - bleak的低功耗蓝牙设备连接
摘要: 1. 接收蓝牙日志 可以用手机拨号##5959##打开蓝牙调试 然后使用对应的手机app先使用对应的蓝牙产品 2. 蓝牙日志分析 将手机上的蓝牙日志文件(btsnoop_hci.log)拷贝到电脑上使用wireshark打开,主要是看发送和接收的数据,以下是某体重秤 3. 寻找设备 import a
阅读全文
posted @ 2023-10-16 16:13 wstong
阅读(2848)
评论(0)
推荐(0)
2023年10月9日
python - black代码格式化工具
摘要: 简单使用 安装 pip3 install black 使用 black {source_file_or_directory} 跳过字符串格式化 black -S {source_file_or_directory}
阅读全文
posted @ 2023-10-09 09:33 wstong
阅读(29)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
下一页
公告