2024.08.21 patch.02
This commit is contained in:
@@ -1235,28 +1235,23 @@ class Ohli24QueueEntity(FfmpegQueueEntity):
|
|||||||
)
|
)
|
||||||
logger.debug(text)
|
logger.debug(text)
|
||||||
soup1 = BeautifulSoup(text, "lxml")
|
soup1 = BeautifulSoup(text, "lxml")
|
||||||
pattern = re.compile(r"url : \"\.\.(.*)\"")
|
# pattern = re.compile(r"url : \"\.\.(.*)\"")
|
||||||
script = soup1.find("script", text=pattern)
|
# 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 = r"\.\.\/(.*stream.php.*)"
|
# if script:
|
||||||
#
|
# match = pattern.search(script.text)
|
||||||
# match = re.search(pattern, text, re.MULTILINE)
|
|
||||||
# if match:
|
# if match:
|
||||||
# print(match)
|
# iframe_url = match.group(1)
|
||||||
# matched_line = match.group(0)
|
# logger.info("iframe_url::> %s", iframe_url)
|
||||||
# print(matched_line)
|
pattern = r"<iframe src=\"(.*?)\" allowfullscreen>"
|
||||||
# iframe_url = "https://ohli24.org/"
|
|
||||||
iframe_src = f'{P.ModelSetting.get("ohli24_url")}{iframe_url}'
|
match = re.search(pattern, text)
|
||||||
|
if match:
|
||||||
|
iframe_src = match.group(1)
|
||||||
|
logger.debug(f"iframe_src:::> {iframe_src}")
|
||||||
|
|
||||||
|
|
||||||
|
# iframe_src = f'{P.ModelSetting.get("ohli24_url")}{iframe_url}'
|
||||||
|
|
||||||
iframe_html = LogicOhli24.get_html(
|
iframe_html = LogicOhli24.get_html(
|
||||||
iframe_src, headers=headers, timeout=600
|
iframe_src, headers=headers, timeout=600
|
||||||
|
|||||||
Reference in New Issue
Block a user