From 385655c5d496c3e6ae7a2f0a845c7e4d356f8a95 Mon Sep 17 00:00:00 2001 From: frxz751113 <156018267+frxz751113@users.noreply.github.com> Date: Thu, 12 Sep 2024 17:59:30 +0800 Subject: [PATCH] =?UTF-8?q?Update=20IPTV=E6=90=9C=E7=B4=A2=E5=BC=95?= =?UTF-8?q?=E6=93=8E=E9=87=87=E9=9B=86.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- py/IPTV搜索引擎采集.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py/IPTV搜索引擎采集.py b/py/IPTV搜索引擎采集.py index 0c13a0c..dcce599 100644 --- a/py/IPTV搜索引擎采集.py +++ b/py/IPTV搜索引擎采集.py @@ -414,8 +414,8 @@ def txt_to_m3u(input_file, output_file): with open(input_file, 'r', encoding='utf-8') as f: lines = f.readlines() # 打开m3u文件并写入内容 - now = datetime.now() - current_time = now.strftime("%H:%M:%S") + now = datetime.datetime.utcnow() + datetime.timedelta(hours=8) + current_time = now.strftime("%Y-%m-%d %H:%M:%S") with open(output_file, 'w', encoding='utf-8') as f: f.write(f'#EXTINF:-1 group-title="更新时间",请您欣赏\n') f.write(f'https://vd2.bdstatic.com/mda-nk3am8nwdgqfy6nh/sc/cae_h264/1667555203921394810/mda-nk3am8nwdgqfy6nh.mp4\n')