Update GAT.py
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user