From ede2baf6eb628b99587d6196114f7293f6da0040 Mon Sep 17 00:00:00 2001 From: frxz751113 <156018267+frxz751113@users.noreply.github.com> Date: Mon, 30 Sep 2024 11:39:40 +0800 Subject: [PATCH] Update GAT.py --- py/GAT.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py/GAT.py b/py/GAT.py index d82a9b1..146d87d 100644 --- a/py/GAT.py +++ b/py/GAT.py @@ -178,14 +178,14 @@ import requests from tqdm import tqdm import threading import re -def test_connectivity(url, max_attempts=1): +def test_connectivity(url, max_attempts=4): video_formats = ["m3u", "/", "rtsp"] if not any(re.search(keyword, url, re.I) for keyword in video_formats): print("\n特殊网址: 跳过检测") return False for _ in range(max_attempts): try: - response = requests.get(url, timeout=3) + response = requests.get(url, timeout=0.3) return response.status_code == 200 except requests.RequestException: pass