From 7d69fe0c6e6e95039c97719da85ce4014b1cf4ec Mon Sep 17 00:00:00 2001 From: frxz751113 <156018267+frxz751113@users.noreply.github.com> Date: Fri, 13 Sep 2024 21:31:43 +0800 Subject: [PATCH] =?UTF-8?q?Update=20=E7=BD=91=E7=BB=9C=E6=94=B6=E9=9B=86.p?= =?UTF-8?q?y?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- py/网络收集.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/py/网络收集.py b/py/网络收集.py index bc1fa73..f9c479e 100644 --- a/py/网络收集.py +++ b/py/网络收集.py @@ -653,15 +653,13 @@ parse_file('网络收集.txt', '网络收集.txt') import datetime now = datetime.datetime.utcnow() + datetime.timedelta(hours=8) -current_time = now.strftime("%m-%d %H:%M") +current_time = now.strftime("%m/%d %H:%M") # 打开文本文件并将时间添加到开头 file_path = "网络收集.txt" with open(file_path, 'r+', encoding='utf-8') as f: content = f.read() f.seek(0, 0) - #f.write(f'更新时间,#genre#\n') - #f.write(f'请您欣赏,https://vd2.bdstatic.com/mda-mi1dd05gmhwejdwn/sc/cae_h264/1630576203346678103/mda-mi1dd05gmhwejdwn.mp4\n') - f.write(f'{current_time},#genre#\n') + f.write(f'{current_time}更新,#genre#\n') f.write(f'虚情的爱,https://vd2.bdstatic.com/mda-mi1dd05gmhwejdwn/sc/cae_h264/1630576203346678103/mda-mi1dd05gmhwejdwn.mp4\n{content}') ################################################################################################任务结束,删除不必要的过程文件