Compare commits

...

5 Commits

Author SHA1 Message Date
a8486726f6 2024.08.21 patch.03 2024-08-21 19:39:50 +09:00
391a0ee861 2024.08.21 patch.02 2024-08-21 19:24:29 +09:00
408be433f2 2024.08.21 patch.01 2024-08-21 19:13:43 +09:00
c87e29f085 2024.08.13 19:22 patch.01 2024-08-13 19:26:16 +09:00
b27cd39aa4 2024.08.13 19:22 2024-08-13 19:22:47 +09:00

View File

@@ -67,7 +67,7 @@ logger = P.logger
class LogicOhli24(LogicModuleBase): class LogicOhli24(LogicModuleBase):
db_default = { db_default = {
"ohli24_db_version": "1.1", "ohli24_db_version": "1.1",
"ohli24_url": "https://a18.ohli24.com", "ohli24_url": "https://a21.ohli24.com",
"ohli24_download_path": os.path.join( "ohli24_download_path": os.path.join(
path_data, P.package_name, "ohli24" path_data, P.package_name, "ohli24"
), ),
@@ -724,6 +724,7 @@ class LogicOhli24(LogicModuleBase):
"_show_time", "_show_time",
"_release_year", "_release_year",
"_drawing", "_drawing",
"_character_design"
] ]
description_dict = { description_dict = {
"원제": "_otit", "원제": "_otit",
@@ -745,8 +746,10 @@ class LogicOhli24(LogicModuleBase):
"개봉일": "_opening_date", "개봉일": "_opening_date",
"런타임": "_run_time", "런타임": "_run_time",
"작화": "_drawing", "작화": "_drawing",
"캐릭터디자인": "_character_design"
} }
list_body_li = tree.xpath('//ul[@class="list-body"]/li') list_body_li = tree.xpath('//ul[@class="list-body"]/li')
# logger.debug(f"list_body_li:: {list_body_li}") # logger.debug(f"list_body_li:: {list_body_li}")
episodes = [] episodes = []
@@ -1208,7 +1211,7 @@ class Ohli24QueueEntity(FfmpegQueueEntity):
# Get episode info from OHLI24 site # Get episode info from OHLI24 site
def make_episode_info(self): def make_episode_info(self):
try: try:
base_url = "https://a18.ohli24.com" base_url = "https://a24.ohli24.com"
base_url = P.ModelSetting.get("ohli24_url") base_url = P.ModelSetting.get("ohli24_url")
iframe_url = "" iframe_url = ""
@@ -1232,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