From 8963da8fd824d0899da98f489556bd443041492a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sat, 23 Sep 2017 16:49:33 +0200 Subject: [PATCH] [spectrumnexus] extract manga metadata --- gallery_dl/extractor/spectrumnexus.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gallery_dl/extractor/spectrumnexus.py b/gallery_dl/extractor/spectrumnexus.py index 48dbc820..0c79fcf8 100644 --- a/gallery_dl/extractor/spectrumnexus.py +++ b/gallery_dl/extractor/spectrumnexus.py @@ -22,11 +22,14 @@ class SpectrumnexusMangaExtractor(MangaExtractor): })] def chapters(self, page): + results = [] + manga = text.extract(page, '', ' · ')[0] page = text.extract(page, 'class="selectchapter"', '</select>')[0] - return [ - self.url + "?ch=" + chapter.replace(" ", "+") - for chapter in text.extract_iter(page, '<option value="', '"') - ] + for chapter in text.extract_iter(page, '<option value="', '"'): + results.append((self.url + "?ch=" + chapter.replace(" ", "+"), { + "manga": manga, "chapter_string": chapter, + })) + return results class SpectrumnexusChapterExtractor(AsynchronousExtractor):