# -*- coding: utf-8 -*- # Copyright 2015-2017 Mike Fährmann # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. """Extract manga pages from http://www.thespectrum.net/manga_scans/""" from .common import MangaExtractor, AsynchronousExtractor, Message from .. import text class SpectrumnexusMangaExtractor(MangaExtractor): """Extractor for manga from thespectrum.net""" category = "spectrumnexus" pattern = [r"(?:https?://)?(view\.thespectrum\.net/series/[^.]+\.html)#?$"] reverse = False test = [("http://view.thespectrum.net/series/kare-kano-volume-01.html", { "url": "b2b175aad5ef1701cc4aee7c24f1ca3a93aba9cb", })] def chapters(self, page): page = text.extract(page, 'class="selectchapter"', '')[0] return [ self.url + "?ch=" + chapter.replace(" ", "+") for chapter in text.extract_iter(page, '