replace 'text.extract()' with 'text.extr()' where possible

This commit is contained in:
Mike Fährmann
2022-11-04 23:39:38 +01:00
parent eb33e6cf2d
commit b0cb4a1b9c
79 changed files with 199 additions and 202 deletions

View File

@@ -62,13 +62,13 @@ class KomikcastChapterExtractor(KomikcastBase, ChapterExtractor):
)
def metadata(self, page):
info = text.extract(page, "<title>", " Komikcast<")[0]
info = text.extr(page, "<title>", " Komikcast<")
return self.parse_chapter_string(info)
@staticmethod
def images(page):
readerarea = text.extract(
page, '<div class="main-reading-area', '</div')[0]
readerarea = text.extr(
page, '<div class="main-reading-area', '</div')
return [
(text.unescape(url), None)
for url in re.findall(r"<img[^>]* src=[\"']([^\"']+)", readerarea)