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