chenlove
 1 import os
 2 #exec_str = r\'copy /b  ts/c9645620628078.ts+ts/c9645620628079.ts  ts/1.ts\'
 3 #os.system(exec_str) 
 4 f = open(\'index.m3u8\', \'r\', encoding=\'utf-8\')
 5 text_list = f.readlines()
 6 files = []
 7 for i in text_list:
 8     if i.find(\'#EX\')==-1:
 9         files.append(i)
10         
11 f.close()
12 
13 
14 tmp = []
15 for file in files[0:450]:
16     tmp.append(file.replace("\n",""))
17     # 合并ts文件
18 os.chdir("ts/")
19 shell_str = \'+\'.join(tmp)
20 #print(shell_str)
21 shell_str = \'copy /b \'+ shell_str + \' 5.mp4\'
22 
23 os.system(shell_str)
24 print(shell_str)

 

分类:

技术点:

相关文章:

  • 2021-08-14
  • 2022-12-23
  • 2021-06-24
  • 2021-11-15
  • 2021-12-27
  • 2022-12-23
猜你喜欢
  • 2021-09-30
  • 2022-12-23
  • 2022-12-23
  • 2022-01-17
  • 2021-06-03
  • 2021-11-23
相关资源
相似解决方案