diff options
| author | 2024-02-20 02:31:10 -0500 | |
|---|---|---|
| committer | 2024-02-20 02:31:10 -0500 | |
| commit | 01166fa52707cc282467427cf0e65c1b8983c4be (patch) | |
| tree | 7f61e0de7e76a7a226bb6e05e4e3d181e11f673a /gallery_dl/extractor/batoto.py | |
| parent | 12e23f1195164dcb740d6d4a4287e762c9e5e534 (diff) | |
New upstream version 1.26.8.upstream/1.26.8
Diffstat (limited to 'gallery_dl/extractor/batoto.py')
| -rw-r--r-- | gallery_dl/extractor/batoto.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gallery_dl/extractor/batoto.py b/gallery_dl/extractor/batoto.py index e82cd09..2adb142 100644 --- a/gallery_dl/extractor/batoto.py +++ b/gallery_dl/extractor/batoto.py @@ -40,10 +40,18 @@ class BatotoChapterExtractor(BatotoBase, ChapterExtractor): def metadata(self, page): extr = text.extract_from(page) - manga, info, _ = extr("<title>", "<").rsplit(" - ", 3) + try: + manga, info, _ = extr("<title>", "<").rsplit(" - ", 3) + except ValueError: + manga = info = None + manga_id = text.extr( extr('rel="canonical" href="', '"'), "/title/", "/") + if not manga: + manga = extr('link-hover">', "<") + info = text.remove_html(extr('link-hover">', "</")) + match = re.match( r"(?:Volume\s+(\d+) )?" r"\w+\s+(\d+)(.*)", info) |
