[comick] detect broken chapters (#8054)
This commit is contained in:
@@ -96,6 +96,13 @@ class ComickChapterExtractor(ComickBase, ChapterExtractor):
|
||||
}
|
||||
|
||||
def images(self, page):
|
||||
if not self._images[0].get("b2key") and all(
|
||||
not img.get("b2key") for img in self._images):
|
||||
self.log.error(
|
||||
"%s: Broken Chapter (missing 'b2key' for all pages)",
|
||||
self.groups[1])
|
||||
return ()
|
||||
|
||||
return [
|
||||
(f"https://meo.comick.pictures/{img['b2key']}", {
|
||||
"width" : img["w"],
|
||||
|
||||
@@ -201,6 +201,14 @@ __tests__ = (
|
||||
"status" : "Complete",
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://comick.io/comic/00-fate-extra/eE2wOoqb-chapter-35-en",
|
||||
"#comment" : "missing page data (#8054)",
|
||||
"#class" : comick.ComickChapterExtractor,
|
||||
"#count" : 0,
|
||||
"#log" : "eE2wOoqb-chapter-35-en: Broken Chapter (missing 'b2key' for all pages)",
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://comick.io/comic/kobayashi-san-chi-no-maid-dragon",
|
||||
"#comment" : "all chapters",
|
||||
|
||||
Reference in New Issue
Block a user