优化一下当链接验证失败后不再创建文件夹

main
roger_home_pc 1 year ago
parent c5fb3554a9
commit ab8e29402c
  1. 2
      main.py
  2. 4
      req.py

@ -6,7 +6,7 @@ import random
# config
# get_end_date = 'today'
get_end_date = '2023-08-09'
get_end_date = '2023-08-01'
# 整理链接格式

@ -166,13 +166,13 @@ class ReqAction:
if isinstance(temp_path_list, list) and base_path[:-1] not in [_dir['path'] for _dir in temp_path_list]:
self.create_dir(base_path)
base_path_list = self.get_dir_list(base_path)
if isinstance(base_path_list, list) and save_path not in [_dir['path'] for _dir in base_path_list]:
self.create_dir(save_path)
verified_links = self.verify_links(save_link, save_code)
if isinstance(verified_links, int):
if verified_links == -9:
return True, '链接密码错误'
if isinstance(verified_links, list):
if isinstance(base_path_list, list) and save_path not in [_dir['path'] for _dir in base_path_list]:
self.create_dir(save_path)
result, name = self.transfer_files(verified_links, save_path)
if result == 0 or result == 4:
return True, name

Loading…
Cancel
Save