[weebcentral] fix extracting wrong number of chapter pages (#6966)
When downloading multiple chapters at once, all chapters after the first one would download only as many pages per chapter as the first one had, due to reusing a cached/shared dict in the wrong way.
This commit is contained in:
@@ -50,14 +50,16 @@ class WeebcentralChapterExtractor(WeebcentralBase, ChapterExtractor):
|
||||
def metadata(self, page):
|
||||
extr = text.extract_from(page)
|
||||
manga_id = extr("'series_id': '", "'")
|
||||
|
||||
data = self._extract_manga_data(manga_id)
|
||||
data["chapter_id"] = self.groups[1]
|
||||
data["chapter_type"] = extr("'chapter_type': '", "'")
|
||||
|
||||
chapter_type = extr("'chapter_type': '", "'")
|
||||
chapter, sep, minor = extr("'number': '", "'").partition(".")
|
||||
data["chapter"] = text.parse_int(chapter)
|
||||
data["chapter_minor"] = sep + minor
|
||||
|
||||
data = {
|
||||
"chapter": text.parse_int(chapter),
|
||||
"chapter_id": self.groups[1],
|
||||
"chapter_type": chapter_type,
|
||||
"chapter_minor": sep + minor,
|
||||
}
|
||||
data.update(self._extract_manga_data(manga_id))
|
||||
|
||||
return data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user