feat:
Some checks are pending
continuous-integration/drone/push Build is running

This commit is contained in:
mol
2023-09-05 13:21:12 +08:00
parent 7d297e380b
commit 32b9c5089b

View File

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