会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
无恙大势
无恙大势
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
2023年2月2日
python循环post数据
摘要: import requests def post_data(url, data, count): for i in range(count): response = requests.post(url, data=data) print(f"POST request {i + 1} returned
阅读全文
posted @ 2023-02-02 00:00 无恙大势
阅读(32)
评论(0)
推荐(0)
2023年2月1日
python处理图片,往图片中写入汉字
摘要: from PIL import Image, ImageDraw, ImageFont def add_text_to_image(image_path, text, font_path, font_size, text_color): image = Image.open(image_path)
阅读全文
posted @ 2023-02-01 23:57 无恙大势
阅读(347)
评论(0)
推荐(0)
百度站长后台python推送工具
摘要: 需要在文件目录下面建一个urls.txt的文件,将所有要推送的url放到文本里。然后运行下面的脚本。 import requests def baidu_push(url, token): headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0
阅读全文
posted @ 2023-02-01 23:52 无恙大势
阅读(157)
评论(0)
推荐(0)
python读取txt并且按行返回list列表
摘要: def read_txt_file(file_path): with open(file_path, 'r') as file: lines = file.readlines() return lines
阅读全文
posted @ 2023-02-01 23:30 无恙大势
阅读(195)
评论(0)
推荐(0)
上一页
1
2
公告