feat:
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
mol
2023-09-05 13:15:06 +08:00
parent 41a4f7e38c
commit 7d297e380b

View File

@ -43,9 +43,8 @@ def pixiv_result_handler(entries):
file_name_pattern = re.compile(r'\/(\w*\.(?:jpg|png))$')
file_name = ','.join(re.findall(file_name_pattern, url))
# 替换不符合文件名规范的字符
path_pattern = re.compile(r'[\/\\\:\*\?\"\<\>\|]')
file_name = re.sub(path_pattern, "_", file_name)
file_name = re.sub(r'[\/\\\:\*\?\"\<\>\|]', "_", file_name)
print(file_name)
if file_name:
full_name = f'{prefix_name} {file_name}'
(status, data) = downloadPic(url)