diff --git a/main.py b/main.py index 44e48ab..aa9d4e6 100644 --- a/main.py +++ b/main.py @@ -1,6 +1,7 @@ from db import DbAction from req import ReqAction from time import sleep +import datetime import random # config @@ -18,7 +19,8 @@ def format_link(link): def req(_data, req_obj, db_obj): base_temp_path = r'/Temp/' - save_path = [base_temp_path, _data['cate'] + r'/', str(_data['id'])] + date_str = datetime.datetime.strftime(datetime.datetime.now(), '%Y%m%d') + save_path = [base_temp_path, _data['cate'] + '_' + date_str + r'/', str(_data['id'])] print('-' * 30 + str(_data['id']) + '-' * 30) print(save_path) link = format_link(_data['save_link'])