From 391a0ee861a40bf98cdf6eccaf35306962cba30b Mon Sep 17 00:00:00 2001 From: projectdx Date: Wed, 21 Aug 2024 19:24:29 +0900 Subject: [PATCH] 2024.08.21 patch.02 --- logic_ohli24.py | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/logic_ohli24.py b/logic_ohli24.py index b0964c4..d5af20c 100644 --- a/logic_ohli24.py +++ b/logic_ohli24.py @@ -1235,28 +1235,23 @@ class Ohli24QueueEntity(FfmpegQueueEntity): ) logger.debug(text) soup1 = BeautifulSoup(text, "lxml") - pattern = re.compile(r"url : \"\.\.(.*)\"") - script = soup1.find("script", text=pattern) - - if script: - match = pattern.search(script.text) - if match: - iframe_url = match.group(1) - logger.info("iframe_url::> %s", iframe_url) - - # try: - # iframe_url = soup1.find("iframe")["src"] - # except: + # pattern = re.compile(r"url : \"\.\.(.*)\"") + # script = soup1.find("script", text=pattern) # - # pattern = r"\.\.\/(.*stream.php.*)" - # - # match = re.search(pattern, text, re.MULTILINE) + # if script: + # match = pattern.search(script.text) # if match: - # print(match) - # matched_line = match.group(0) - # print(matched_line) - # iframe_url = "https://ohli24.org/" - iframe_src = f'{P.ModelSetting.get("ohli24_url")}{iframe_url}' + # iframe_url = match.group(1) + # logger.info("iframe_url::> %s", iframe_url) + pattern = r"