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")