From bb9dbcb7abc0332b8a712e386c243600d3adb4de Mon Sep 17 00:00:00 2001 From: frxz751113 <156018267+frxz751113@users.noreply.github.com> Date: Mon, 19 Aug 2024 09:50:39 +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 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/py/iptv流畅度检测.py b/py/iptv流畅度检测.py index d1482cf..3a462c1 100644 --- a/py/iptv流畅度检测.py +++ b/py/iptv流畅度检测.py @@ -57,23 +57,29 @@ for keyword in keywords: if province == "北京" and isp == "联通": isp_en = "cucc" org = "China Unicom Beijing Province Network" + asn = "4808" + others = '&& city="beijing" elif isp == "联通": isp_en = "cucc" org = "CHINA UNICOM China169 Backbone" + asn = "4837" elif isp == "电信": org = "Chinanet" isp_en = "ctcc" + asn = "4134" elif isp == "移动": org == "China Mobile communications corporation" isp_en = "cmcc" - + else: + asn = "" + org = "" current_time = datetime.now() timeout_cnt = 0 result_urls = set() while len(result_urls) == 0 and timeout_cnt <= 5: try: search_url = 'https://fofa.info/result?qbase64=' - search_txt = f'\"udpxy\" && country=\"CN\" && region=\"{province}\"' # && org=\"{org}\" + search_txt = f'\"udpxy\" && country=\"CN\" && region=\"{province}\" {others} && asn=\"{asn}\"' # && org=\"{org}\" # 将字符串编码为字节流 bytes_string = search_txt.encode('utf-8') # 使用 base64 进行编码