From f537ad5f2f255282df53fa7b312f44041f8c3e55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Wed, 5 Apr 2017 12:16:23 +0200 Subject: [PATCH] [kissmanga] re-enable module --- README.rst | 1 + gallery_dl/extractor/__init__.py | 1 + gallery_dl/extractor/kissmanga.py | 20 +++++++++++++++++--- gallery_dl/extractor/readcomiconline.py | 7 ++++++- supportedsites.rst | 1 + 5 files changed, 26 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 6f49bfd8..25b4ec86 100644 --- a/README.rst +++ b/README.rst @@ -80,6 +80,7 @@ Supported Sites * nijie.info * bato.to * mangastream.com +* kissmanga.com * readcomiconline.to * danbooru.donmai.us * gelbooru.com diff --git a/gallery_dl/extractor/__init__.py b/gallery_dl/extractor/__init__.py index 1dc8aa85..a25b36dd 100644 --- a/gallery_dl/extractor/__init__.py +++ b/gallery_dl/extractor/__init__.py @@ -38,6 +38,7 @@ modules = [ "jaiminisbox", "khinsider", "kisscomic", + "kissmanga", "konachan", "luscious", "mangafox", diff --git a/gallery_dl/extractor/kissmanga.py b/gallery_dl/extractor/kissmanga.py index 359007af..52200094 100644 --- a/gallery_dl/extractor/kissmanga.py +++ b/gallery_dl/extractor/kissmanga.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2015, 2016 Mike Fährmann +# 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 @@ -9,9 +9,20 @@ """Extract manga-chapters and entire manga from http://kissmanga.com/""" from .common import Extractor, Message -from .. import text, cloudflare +from .. import text, cloudflare, aes import re +KEY = [ + 9, 156, 103, 232, 193, 166, 41, 125, + 179, 74, 152, 145, 228, 219, 228, 25, + 22, 110, 191, 123, 177, 27, 111, 71, + 173, 92, 161, 63, 162, 175, 84, 24, +] +IV = [ + 165, 232, 226, 233, 194, 114, 27, 224, + 168, 74, 214, 96, 196, 114, 193, 243, +] + class KissmangaExtractor(Extractor): """Base class for kissmanga extractors""" @@ -96,4 +107,7 @@ class KissmangaChapterExtractor(KissmangaExtractor): @staticmethod def get_image_urls(page): """Extract list of all image-urls for a manga chapter""" - return list(text.extract_iter(page, 'lstImages.push("', '"')) + return [ + aes.aes_cbc_decrypt_text(data, KEY, IV) + for data in text.extract_iter(page, 'lstImages.push(wrapKA("', '"') + ] diff --git a/gallery_dl/extractor/readcomiconline.py b/gallery_dl/extractor/readcomiconline.py index 3d0ede82..67ddd765 100644 --- a/gallery_dl/extractor/readcomiconline.py +++ b/gallery_dl/extractor/readcomiconline.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2016 Mike Fährmann +# 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 @@ -60,3 +60,8 @@ class ReadcomiconlineIssueExtractor(ReadcomiconlineExtractor, "lang": "en", "language": "English", } + + @staticmethod + def get_image_urls(page): + """Extract list of all image-urls for a manga chapter""" + return list(text.extract_iter(page, 'lstImages.push("', '"')) diff --git a/supportedsites.rst b/supportedsites.rst index 62552bcc..25b8e643 100644 --- a/supportedsites.rst +++ b/supportedsites.rst @@ -43,6 +43,7 @@ Supported Sites - jaiminisbox.com - khinsider.com - kisscomic.us +- kissmanga.com - kobato.hologfx.com - konachan.com - luscious.net