From 9558d4e113fb5cdc0bcaf865f40e535af04fb221 Mon Sep 17 00:00:00 2001 From: frxz751113 <156018267+frxz751113@users.noreply.github.com> Date: Tue, 3 Sep 2024 10:51:11 +0800 Subject: [PATCH] =?UTF-8?q?Update=20=E9=85=92=E5=BA=97=E6=BA=90.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- py/酒店源.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/py/酒店源.py b/py/酒店源.py index 59b0292..d146600 100644 --- a/py/酒店源.py +++ b/py/酒店源.py @@ -54,14 +54,9 @@ def modify_urls(url): port = url[ip_end_index:] # 定义一个字符串,表示 IP 地址的结尾部分 ip_end = "/ZHGXTV/Public/json/live_interface.txt" - # 遍历 1 到 255 的数字 - for i in range(1, 256): - # 修改 IP 地址的最后一位数字 - modified_ip = f"{ip_address[:-1]}{i}" - # 组合成新的 URL - modified_url = f"{base_url}{ip_address}{port}{ip_end}" + modified_url = f"{base_url}{ip_address}{port}{ip_end}" # 将新的 URL 添加到列表中 - modified_urls.append(modified_url) + modified_urls.append(modified_url) # 返回修改后的 URL 列表 return modified_urls