1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 10:42:34 +01:00

simplify MangaExtractor class

This commit is contained in:
Mike Fährmann 2017-09-24 16:03:29 +02:00
parent 9fc1d0c901
commit deb2e803ba
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -161,21 +161,14 @@ class MangaExtractor(Extractor):
chapters.reverse()
yield Message.Version, 1
try:
for chapter, data in chapters:
yield Message.Queue, chapter, data
except ValueError:
for chapter in chapters:
yield Message.Queue, chapter, {}
for chapter, data in chapters:
yield Message.Queue, chapter, data
def login(self):
"""Login and set necessary cookies"""
def chapters(self, page):
"""Return a list of all chapter urls"""
return [self.root + path for path in self.chapter_paths(page)]
def chapter_paths(self, page):
"""Return a list of all (url, metadata)-tuples"""
return []