[mangaread] fix 'tags' extraction

This commit is contained in:
Mike Fährmann
2023-05-25 17:04:20 +02:00
parent 5f86527cbe
commit 3d29c42142

View File

@@ -87,7 +87,7 @@ class MangareadChapterExtractor(MangareadBase, ChapterExtractor):
) )
def metadata(self, page): def metadata(self, page):
data = {"tags": list(text.extract_iter(page, 'class="">', "<"))} data = {"tags": list(text.extract_iter(page, "class>", "<"))}
info = text.extr(page, '<h1 id="chapter-heading">', "</h1>") info = text.extr(page, '<h1 id="chapter-heading">', "</h1>")
if not info: if not info:
raise exception.NotFoundError("chapter") raise exception.NotFoundError("chapter")
@@ -148,11 +148,13 @@ class MangareadMangaExtractor(MangareadBase, MangaExtractor):
} }
}), }),
("https://www.mangaread.org/manga/doesnotexist", { ("https://www.mangaread.org/manga/doesnotexist", {
"exception": exception.HttpError, "exception": exception.NotFoundError,
}), }),
) )
def chapters(self, page): def chapters(self, page):
if 'class="error404' in page:
raise exception.NotFoundError("manga")
data = self.metadata(page) data = self.metadata(page)
result = [] result = []
for chapter in text.extract_iter( for chapter in text.extract_iter(