From b9f938f4349688feeac23ac9f9c49ad273b708c1 Mon Sep 17 00:00:00 2001 From: frxz751113 <156018267+frxz751113@users.noreply.github.com> Date: Fri, 9 Aug 2024 17:26:41 +0800 Subject: [PATCH] Update iptv.py --- py/iptv.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py/iptv.py b/py/iptv.py index 9c9d6e1..d73e950 100644 --- a/py/iptv.py +++ b/py/iptv.py @@ -123,7 +123,7 @@ for url in urls: # 按行分割数据 lines = json_data.split('\n') for line in lines: - if 'udp' in line or 'rtp' in line: + if 'udp' not in line and 'rtp' not in line: pass line = line.strip() if line: @@ -372,7 +372,7 @@ for url in urls: name = item.get('name') urlx = item.get('url') # 如果url字段中包含',',并且包含'udp'、'rtp'或':1111',则跳过 - if ',' in urlx or 'udp' in urlx or 'rtp' in urlx: + if ',' not in urlx and 'udp' not in urlx anf 'rtp' not in urlx: pass #无意义字符串,表示值为空而已 # 判断urlx是否包含'http',如果包含,则直接使用urlx作为urld if 'http' in urlx: