From 8cac2e75f9e66651c2286e4a18efb9212fd94ba9 Mon Sep 17 00:00:00 2001 From: frxz751113 <156018267+frxz751113@users.noreply.github.com> Date: Wed, 14 Aug 2024 23:16:36 +0800 Subject: [PATCH] =?UTF-8?q?Update=20iptv=E6=B5=81=E7=95=85=E5=BA=A6?= =?UTF-8?q?=E6=A3=80=E6=B5=8B.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- py/iptv流畅度检测.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/py/iptv流畅度检测.py b/py/iptv流畅度检测.py index 2bc30a2..d0d39f6 100644 --- a/py/iptv流畅度检测.py +++ b/py/iptv流畅度检测.py @@ -144,7 +144,8 @@ for url in valid_urls: check_response = requests.get(urld, timeout=0.5) if check_response.status_code != 200: continue_parsing = False # 如果状态码不是200,设置标志为False,跳过当前JSON文件的解析 - + else: + continue # 如果continue_parsing为True,继续解析当前JSON文件 if continue_parsing: for line in lines: @@ -158,11 +159,7 @@ for url in valid_urls: urld = (f"{urls[0]}//{url_data[2]}/{urls[3]}") else: urld = (f"{urls[0]}//{url_data[2]}") - print(f"{name},{urld}") - except requests.exceptions.HTTPError as e: - print(f"HTTPError occurred: {e}") - except requests.exceptions.RequestException as e: - print(f"RequestException occurred: {e}") + print(f"{name},{urld}") if name and urld: name = name.replace("高清电影", "影迷电影") name = name.replace("中央", "CCTV")