main -> 2023.08.31 ohli24 버그 픽스 (.01. 다운로드 문제 해결)

This commit is contained in:
2023-08-31 00:20:57 +09:00
parent c53f1f50c9
commit 769d40e5bb

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://ohli24.live", "ohli24_url": "https://ohli24.com",
"ohli24_download_path": os.path.join(path_data, P.package_name, "ohli24"), "ohli24_download_path": os.path.join(path_data, P.package_name, "ohli24"),
"ohli24_auto_make_folder": "True", "ohli24_auto_make_folder": "True",
"ohli24_auto_make_season_folder": "True", "ohli24_auto_make_season_folder": "True",
@@ -234,7 +234,7 @@ class LogicOhli24(LogicModuleBase):
LogicOhli24.headers[ LogicOhli24.headers[
"Referer" "Referer"
] = "https://anilife.live/detail/id/471" ] = "https://anilife.com/detail/id/471"
# print(LogicAniLife.headers) # print(LogicAniLife.headers)
LogicOhli24.headers["Referer"] = LogicOhli24.episode_url LogicOhli24.headers["Referer"] = LogicOhli24.episode_url
@@ -957,7 +957,7 @@ class LogicOhli24(LogicModuleBase):
def check_for_new_post(self): def check_for_new_post(self):
# Get the HTML content of the page # Get the HTML content of the page
res = requests.get("https://ohli24.live/bbs/board.php?bo_table=ing") res = requests.get("https://ohli24.com/bbs/board.php?bo_table=ing")
soup = BeautifulSoup(res.content, "html.parser") soup = BeautifulSoup(res.content, "html.parser")
# Find the latest post on the page # Find the latest post on the page
@@ -966,7 +966,7 @@ class LogicOhli24(LogicModuleBase):
soup.find("div", class_="img-item") soup.find("div", class_="img-item")
.find("img", class_="wr-img") .find("img", class_="wr-img")
.get("src") .get("src")
.replace("..", "https://ohli24.live") .replace("..", "https://ohli24.com")
) )
logger.debug(f"latest_post:: {latest_post}") logger.debug(f"latest_post:: {latest_post}")
@@ -1167,7 +1167,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://ohli24.live" base_url = "https://ohli24.com"
iframe_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 # 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
@@ -1211,7 +1211,7 @@ class Ohli24QueueEntity(FfmpegQueueEntity):
# matched_line = match.group(0) # matched_line = match.group(0)
# print(matched_line) # print(matched_line)
# iframe_url = "https://ohli24.org/" # iframe_url = "https://ohli24.org/"
iframe_src = f"https://ohli24.live{iframe_url}" iframe_src = f"https://ohli24.com{iframe_url}"
iframe_html = LogicOhli24.get_html(iframe_src, headers=headers, timeout=600) iframe_html = LogicOhli24.get_html(iframe_src, headers=headers, timeout=600)