Compare commits
3 Commits
c87e29f085
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| a8486726f6 | |||
| 391a0ee861 | |||
| 408be433f2 |
@@ -1211,7 +1211,7 @@ class Ohli24QueueEntity(FfmpegQueueEntity):
|
||||
# Get episode info from OHLI24 site
|
||||
def make_episode_info(self):
|
||||
try:
|
||||
base_url = "https://a21.ohli24.com"
|
||||
base_url = "https://a24.ohli24.com"
|
||||
base_url = P.ModelSetting.get("ohli24_url")
|
||||
iframe_url = ""
|
||||
|
||||
@@ -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"<iframe src=\"(.*?)\" allowfullscreen>"
|
||||
|
||||
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_src, headers=headers, timeout=600
|
||||
|
||||
Reference in New Issue
Block a user