diff --git a/logic_ohli24.py b/logic_ohli24.py index f40e43a..759e31b 100644 --- a/logic_ohli24.py +++ b/logic_ohli24.py @@ -955,7 +955,9 @@ class LogicOhli24(LogicModuleBase): def check_for_new_post(self): # Get the HTML content of the page - res = requests.get("https://a18.ohli24.com/bbs/board.php?bo_table=ing") + res = requests.get( + f'{P.ModelSetting.get("ohli24_url")}/bbs/board.php?bo_table=ing' + ) soup = BeautifulSoup(res.content, "html.parser") # Find the latest post on the page @@ -964,7 +966,7 @@ class LogicOhli24(LogicModuleBase): soup.find("div", class_="img-item") .find("img", class_="wr-img") .get("src") - .replace("..", "https://a18.ohli24.com") + .replace("..", P.ModelSetting.get("ohli24_url")) ) logger.debug(f"latest_post:: {latest_post}") @@ -1166,6 +1168,7 @@ class Ohli24QueueEntity(FfmpegQueueEntity): def make_episode_info(self): try: base_url = "https://a18.ohli24.com" + base_url = P.ModelSetting.get("ohli24_url") iframe_url = "" # https://ohli24.org/e/%EB%85%B9%EC%9D%84%20%EB%A8%B9%EB%8A%94%20%EB%B9%84%EC%8A%A4%EC%BD%94%206%ED%99%94 @@ -1209,7 +1212,7 @@ class Ohli24QueueEntity(FfmpegQueueEntity): # matched_line = match.group(0) # print(matched_line) # iframe_url = "https://ohli24.org/" - iframe_src = f"https://a18.ohli24.com{iframe_url}" + iframe_src = f'{P.ModelSetting.get("ohli24_url")}{iframe_url}' iframe_html = LogicOhli24.get_html(iframe_src, headers=headers, timeout=600)