# -*- coding: utf-8 -*- # Copyright 2016-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 comic-issues and entire comics from http://kisscomic.us/""" from . import kissmanga from .. import text class KisscomicExtractor(kissmanga.KissmangaExtractor): """Base class for kisscomic extractors""" category = "kisscomic" directory_fmt = ["{category}", "{comic}", "{issue:>03}"] filename_fmt = "{comic}_{issue:>03}_{page:>03}.{extension}" root = "http://kisscomic.us" class KisscomicComicExtractor(KisscomicExtractor, kissmanga.KissmangaMangaExtractor): """Extractor for comics from kisscomic.us""" subcategory = "comic" pattern = [r"(?:https?://)?(?:www\.)?kisscomic\.us/comics/[^/]+\.html$"] test = [("http://kisscomic.us/comics/47-ronin.html", { "url": "8c180e2ec2492712b089ca091c54909cb0fe3d4a", })] def chapter_paths(self, page): pos = page.find('