Use english title for MangaPill. Changed filename format.
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ from pathlib import Path
|
|||||||
|
|
||||||
def zip_files(slug, chapter: dict, files: list[Path], save_dir: Path):
|
def zip_files(slug, chapter: dict, files: list[Path], save_dir: Path):
|
||||||
save_dir.joinpath(slug).mkdir(exist_ok=True)
|
save_dir.joinpath(slug).mkdir(exist_ok=True)
|
||||||
filename = save_dir.joinpath(slug).joinpath(f"{slug} - Ch. {chapter.get('nr'):g}.cbz") # type: ignore
|
filename = save_dir.joinpath(slug).joinpath(f"{slug} Ch.{chapter.get('nr'):g}.cbz") # type: ignore
|
||||||
with zipfile.ZipFile(filename, "w") as zf:
|
with zipfile.ZipFile(filename, "w") as zf:
|
||||||
for file in files:
|
for file in files:
|
||||||
zf.write(file, file.name)
|
zf.write(file, file.name)
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ class Mangapill(Provider):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def parse_info(payload: bs) -> dict:
|
def parse_info(payload: bs) -> dict:
|
||||||
|
title_elem = payload.select_one("div.text-sm.text-secondary")
|
||||||
|
if not title_elem:
|
||||||
title_elem = payload.select_one("h1.font-bold")
|
title_elem = payload.select_one("h1.font-bold")
|
||||||
title = title_elem.get_text(strip=True) if title_elem else "Unknown Title"
|
title = title_elem.get_text(strip=True) if title_elem else "Unknown Title"
|
||||||
desc_p = payload.select_one("p.text-sm.text--secondary")
|
desc_p = payload.select_one("p.text-sm.text--secondary")
|
||||||
|
|||||||
Reference in New Issue
Block a user