hebing.py 570 B

123456789101112131415161718192021
  1. import time
  2. import concurrent.futures
  3. from selenium import webdriver
  4. from selenium.webdriver.chrome.options import Options
  5. import requests
  6. import json
  7. import re
  8. # 合并文件内容
  9. file_contents = []
  10. file_paths = ["itvlist.m3u", "witvlist.m3u"] # 替换为实际的文件路径列表
  11. for file_path in file_paths:
  12. with open(file_path, 'r', encoding="utf-8") as file:
  13. content = file.read()
  14. file_contents.append(content)
  15. # 写入合并后的文件
  16. with open("hnitv.m3u", "w", encoding="utf-8") as output:
  17. output.write('\n'.join(file_contents))