import re port = "\'HD高清$https://yiqikan.wuyouzuida.com/20200904/6468_03288788/index.m3u8\'" #匹配.m3u8 的网站 port = re.findall(\'[a-zA-Z]+://[^\s]*[.com|.cn]*[.m3u8]\', port)
#port = re.findall(\'[a-zA-Z]+://[^\s]*[.com|.cn]\', port) 匹配网站 #port = \',\'.join(port) print("Urls: ", port)