From bf0aa209b7c313fda6c10b29448fabae03895d82 Mon Sep 17 00:00:00 2001 From: frxz751113 <156018267+frxz751113@users.noreply.github.com> Date: Tue, 3 Sep 2024 07:00:57 +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 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/py/酒店源.py b/py/酒店源.py index 1cdbcca..d5cf4e9 100644 --- a/py/酒店源.py +++ b/py/酒店源.py @@ -55,7 +55,9 @@ def modify_urls(url): # 组合成新的 URL modified_url = f"{url[:ip_start_index]}{ip_address}{port}{ip_end}" # 将新的 URL 添加到列表中 - return [modified_url] + modified_urls.append(modified_url) + # 返回修改后的 URL 列表 + return modified_urls def is_url_accessible(url): try: @@ -326,11 +328,13 @@ def modify_urls(url): # 获取 URL 中的端口部分 port = url[ip_end_index:] # 定义一个字符串,表示 IP 地址的结尾部分 - ip_end = "/iptv/live/1000.json?key=txiptv" + ip_end = "/ZHGXTV/Public/json/live_interface.txt" # 组合成新的 URL modified_url = f"{url[:ip_start_index]}{ip_address}{port}{ip_end}" # 将新的 URL 添加到列表中 - return [modified_url] + modified_urls.append(modified_url) + # 返回修改后的 URL 列表 + return modified_urls def is_url_accessible(url): try: