Skip to content

Commit

Permalink
更新 itv_all.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ssili126 committed Mar 1, 2024
1 parent d3734ac commit 82f1159
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions itv_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,20 +275,20 @@ def channel_key(channel_name):
results.sort(key=lambda x: channel_key(x[0]))

# 将结果写入文件
with open("itv_all_results.txt", 'w', encoding='utf-8') as file:
with open("itv_results.txt", 'w', encoding='utf-8') as file:
for result in results:
channel_name, channel_url, speed = result
file.write(f"{channel_name},{channel_url},{speed}\n")

with open("itv_all_speed.txt", 'w', encoding='utf-8') as file:
with open("itv_speed.txt", 'w', encoding='utf-8') as file:
for result in results:
channel_name, channel_url, speed = result
file.write(f"{channel_name},{channel_url}\n")


result_counter = 8 # 每个频道需要的个数

with open("itv_all.txt", 'w', encoding='utf-8') as file:
with open("itvlist.txt", 'w', encoding='utf-8') as file:
channel_counters = {}
file.write('央视频道,#genre#\n')
for result in results:
Expand Down Expand Up @@ -332,7 +332,7 @@ def channel_key(channel_name):
file.write(f"{channel_name},{channel_url}\n")
channel_counters[channel_name] = 1

with open("itv_all.m3u", 'w', encoding='utf-8') as file:
with open("itvlist.m3u", 'w', encoding='utf-8') as file:
channel_counters = {}
file.write('#EXTM3U\n')
for result in results:
Expand Down

0 comments on commit 82f1159

Please sign in to comment.