ohli24 api update 2023.01.15(01.)

This commit is contained in:
2023-01-15 16:46:48 +09:00
parent 7a82dc2fc7
commit 6a309e0e11

View File

@@ -61,7 +61,7 @@ logger = P.logger
class LogicOhli24(LogicModuleBase):
db_default = {
"ohli24_db_version": "1",
"ohli24_url": "https://ohli24.net",
"ohli24_url": "https://ohli24.org",
"ohli24_download_path": os.path.join(path_data, P.package_name, "ohli24"),
"ohli24_auto_make_folder": "True",
"ohli24_auto_make_season_folder": "True",
@@ -825,7 +825,7 @@ class LogicOhli24(LogicModuleBase):
# )
# print(response_data)
tree = html.fromstring(response_data)
tmp_items = tree.xpath('//div[@class="post-row"]')
tmp_items = tree.xpath('//div[@class="list-row"]')
data["anime_count"] = len(tmp_items)
data["anime_list"] = []
@@ -1068,17 +1068,18 @@ class Ohli24QueueEntity(FfmpegQueueEntity):
# Get episode info from OHLI24 site
def make_episode_info(self):
try:
base_url = "https://ohli24.net"
base_url = "https://ohli24.org"
iframe_url = ""
# https://ohli24.net/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
url = self.info["va"]
ourls = parse.urlparse(url)
headers = {
"referer": f"{ourls.scheme}://{ourls.netloc}",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Whale/3.12.129.46 Safari/537.36",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) "
"Chrome/96.0.4664.110 Whale/3.12.129.46 Safari/537.36",
}
logger.debug("make_episode_info()::url==> %s", url)
logger.info(f"self.info:::> {self.info}")