mirror of
https://github.com/abc1763613206/myiptv.git
synced 2025-12-18 07:44:36 +08:00
optimize
This commit is contained in:
6
main.py
6
main.py
@@ -7,6 +7,7 @@ import traceback
|
|||||||
import requests
|
import requests
|
||||||
import subprocess
|
import subprocess
|
||||||
import time
|
import time
|
||||||
|
import shutil
|
||||||
from ffmpy import FFprobe
|
from ffmpy import FFprobe
|
||||||
from subprocess import PIPE
|
from subprocess import PIPE
|
||||||
from sys import stdout
|
from sys import stdout
|
||||||
@@ -92,6 +93,11 @@ def main():
|
|||||||
fulltimes = '-{}{}{}{}{}'.format(dt.year,dt.month,dt.day,dt.hour,dt.minute) # 时间后缀
|
fulltimes = '-{}{}{}{}{}'.format(dt.year,dt.month,dt.day,dt.hour,dt.minute) # 时间后缀
|
||||||
# times = fulltimes # 有时间后缀
|
# times = fulltimes # 有时间后缀
|
||||||
times = '' # 无时间后缀
|
times = '' # 无时间后缀
|
||||||
|
# 清空旧文件
|
||||||
|
shutil.rmtree('groups')
|
||||||
|
os.mkdir('groups')
|
||||||
|
os.remove('merged.txt')
|
||||||
|
os.remove('merged-simple.txt')
|
||||||
with open('data.csv') as f:
|
with open('data.csv') as f:
|
||||||
f_csv = csv.reader(f)
|
f_csv = csv.reader(f)
|
||||||
headers = next(f_csv)
|
headers = next(f_csv)
|
||||||
|
|||||||
Reference in New Issue
Block a user