Update GAT.py

This commit is contained in:
frxz751113
2024-10-06 15:45:42 +08:00
committed by GitHub
parent 0be8cc3c52
commit 17c8304a7b
+2 -2
View File
@@ -733,7 +733,7 @@ def process_line(line, output_file, order_list, valid_count, invalid_count, tota
elif len(parts) == 2:
channel_name, channel_url = parts
resolution = get_video_resolution(channel_url, timeout=8)
if resolution and resolution[1] >= 720: # 检查分辨率是否大于等于720p
if resolution and resolution[1] >= 540: # 检查分辨率是否大于等于720p
with threading.Lock():
output_file.write(f"{channel_name}[{resolution[1]}p],{channel_url}\n")
order_list.append((channel_name, resolution[1], channel_url))
@@ -764,7 +764,7 @@ def main(source_file_path, output_file_path):
lines = source_file.readlines()
with open(output_file_path + '.txt', 'w', encoding='utf-8') as output_file:
# 创建线程池
with ThreadPoolExecutor(max_workers=64) as executor:
with ThreadPoolExecutor(max_workers=256) as executor:
# 创建并启动工作线程
for _ in range(64):
executor.submit(worker, task_queue, output_file, order_list, valid_count, invalid_count, len(lines))