[spectrumnexus] extract manga metadata

This commit is contained in:
Mike Fährmann
2017-09-23 16:49:33 +02:00
parent a3e40734d1
commit 8963da8fd8

View File

@@ -22,11 +22,14 @@ class SpectrumnexusMangaExtractor(MangaExtractor):
})] })]
def chapters(self, page): def chapters(self, page):
results = []
manga = text.extract(page, '<title>', ' &#183; ')[0]
page = text.extract(page, 'class="selectchapter"', '</select>')[0] page = text.extract(page, 'class="selectchapter"', '</select>')[0]
return [ for chapter in text.extract_iter(page, '<option value="', '"'):
self.url + "?ch=" + chapter.replace(" ", "+") results.append((self.url + "?ch=" + chapter.replace(" ", "+"), {
for chapter in text.extract_iter(page, '<option value="', '"') "manga": manga, "chapter_string": chapter,
] }))
return results
class SpectrumnexusChapterExtractor(AsynchronousExtractor): class SpectrumnexusChapterExtractor(AsynchronousExtractor):