Update 测绘站采集.py

This commit is contained in:
frxz751113
2024-09-13 14:59:12 +08:00
committed by GitHub
parent 57f934e8e1
commit f507540de3
+2 -2
View File
@@ -469,7 +469,7 @@ txt_to_m3u('综合源.txt', '综合源.m3u')
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 = "综合源.m3u"
with open(file_path, 'r+', encoding='utf-8') as f:
@@ -478,7 +478,7 @@ with open(file_path, 'r+', encoding='utf-8') as f:
f.write(f'{content}\n')
#f.write(f'#EXTINF:-1 group-title="更新时间",请您欣赏\n')
#f.write(f'http://em.21dtv.com/songs/60144971.mkv\n')
f.write(f'#EXTINF:-1 group-title="{current_time}",虚情的爱\n')
f.write(f'#EXTINF:-1 group-title="{current_time}更新",虚情的爱\n')
f.write(f'https://vd2.bdstatic.com/mda-mi1dd05gmhwejdwn/sc/cae_h264/1630576203346678103/mda-mi1dd05gmhwejdwn.mp4\n')
#任务结束,删除不必要的过程文件#