From 08df3a53002ab79070622c88bafd53bcf45addaf Mon Sep 17 00:00:00 2001 From: Dorae <86833913+Toperlock@users.noreply.github.com> Date: Sun, 14 Jul 2024 12:23:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4`yaml`=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E9=87=8C`no-resolve`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index e53f264..468f8c5 100644 --- a/main.py +++ b/main.py @@ -89,7 +89,9 @@ def parse_and_convert_to_dataframe(link): else: pattern = 'DOMAIN' else: - pattern, address = item.split(',', 1) + pattern, address = item.split(',', 1) + if pattern == "IP-CIDR" and "no-resolve" in address: + address = address.split(',', 1)[0] rows.append({'pattern': pattern.strip(), 'address': address.strip(), 'other': None}) df = pd.DataFrame(rows, columns=['pattern', 'address', 'other']) except: