mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
add change_img_md5
This commit is contained in:
parent
785179e4a7
commit
6effbacb28
@ -398,3 +398,19 @@ def change_pixiv_image_links(
|
||||
.replace("_webp", "")
|
||||
)
|
||||
return url
|
||||
|
||||
|
||||
def change_img_md5(path_file) -> bool:
|
||||
"""
|
||||
说明:
|
||||
改变图片MD5
|
||||
参数:
|
||||
:param path_file: 图片路径
|
||||
"""
|
||||
try:
|
||||
with open(path_file, "a") as f:
|
||||
f.write(str(int(time.time() * 1000)))
|
||||
f.close()
|
||||
return True
|
||||
except:
|
||||
return False
|
||||
Loading…
Reference in New Issue
Block a user