From 50d27d4508f0d3842d244ac1627d8889b57ded15 Mon Sep 17 00:00:00 2001 From: RogerWork Date: Tue, 8 Aug 2023 08:02:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E8=B7=AF=E5=BE=84=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=97=A5=E6=9C=9F=E5=8C=BA=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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'])