From 6950708e52c93a16df85e5b88f4f90fe7e6719cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Wed, 2 Aug 2017 18:31:21 +0200 Subject: [PATCH] [hentaicdn] use HTTPS --- gallery_dl/extractor/hentai2read.py | 11 ++++++----- gallery_dl/extractor/hentaicdn.py | 2 +- gallery_dl/extractor/hentaihere.py | 2 +- test/test_extractors.py | 4 +++- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/gallery_dl/extractor/hentai2read.py b/gallery_dl/extractor/hentai2read.py index 7ac96011..b8c8ac47 100644 --- a/gallery_dl/extractor/hentai2read.py +++ b/gallery_dl/extractor/hentai2read.py @@ -18,14 +18,15 @@ import json class Hentai2readMangaExtractor(MangaExtractor): """Extractor for hmanga from hentai2read.com""" category = "hentai2read" + scheme = "https" pattern = [r"(?:https?://)?(?:www\.)?(hentai2read\.com/[^/]+/?)$"] test = [ ("http://hentai2read.com/amazon_elixir/", { - "url": "d1f87b71d3c97b49a478cdfb6ae96b2d9520ab78", + "url": "273073752d418ec887d7f7211e42b832e8c403ba", }), ("http://hentai2read.com/oshikage_riot/", { - "url": "672f34cce7bf5a855c6c38e8bc9c5117a4b3061c", - }) + "url": "6595f920a3088a15c2819c502862d45f8eb6bea6", + }), ] def chapters(self, page): @@ -40,14 +41,14 @@ class Hentai2readChapterExtractor(hentaicdn.HentaicdnChapterExtractor): category = "hentai2read" pattern = [r"(?:https?://)?(?:www\.)?hentai2read\.com/([^/]+)/(\d+)"] test = [("http://hentai2read.com/amazon_elixir/1/", { - "url": "fb5fc4d7cc194116960eaa648c7e045a6e6f0c11", + "url": "964b942cf492b3a129d2fe2608abfc475bc99e71", "keyword": "c05d0d0bbe188926b15a43df1f8f65b8ac11c3fd", })] def __init__(self, match): hentaicdn.HentaicdnChapterExtractor.__init__(self) url_title, self.chapter = match.groups() - self.url = "http://hentai2read.com/{}/{}/".format( + self.url = "https://hentai2read.com/{}/{}/".format( url_title, self.chapter ) diff --git a/gallery_dl/extractor/hentaicdn.py b/gallery_dl/extractor/hentaicdn.py index 83bd1264..03909cb3 100644 --- a/gallery_dl/extractor/hentaicdn.py +++ b/gallery_dl/extractor/hentaicdn.py @@ -29,7 +29,7 @@ class HentaicdnChapterExtractor(Extractor): yield Message.Directory, data for num, part in enumerate(images, 1): data["num"] = num - url = "http://hentaicdn.com/hentai" + part + url = "https://hentaicdn.com/hentai" + part yield Message.Url, url, text.nameext_from_url(url, data) def get_job_metadata(self, page, images): diff --git a/gallery_dl/extractor/hentaihere.py b/gallery_dl/extractor/hentaihere.py index cc3482a5..85b5d2b0 100644 --- a/gallery_dl/extractor/hentaihere.py +++ b/gallery_dl/extractor/hentaihere.py @@ -39,7 +39,7 @@ class HentaihereChapterExtractor(hentaicdn.HentaicdnChapterExtractor): category = "hentaihere" pattern = [r"(?:https?://)?(?:www\.)?hentaihere\.com/m/S(\d+)/(\d+)"] test = [("https://hentaihere.com/m/S13812/1/1/", { - "url": "fb5fc4d7cc194116960eaa648c7e045a6e6f0c11", + "url": "964b942cf492b3a129d2fe2608abfc475bc99e71", "keyword": "e8625ccca8466a5dee089394fc29efea6d6e2950", })] diff --git a/test/test_extractors.py b/test/test_extractors.py index 274ee78c..a2eeb175 100644 --- a/test/test_extractors.py +++ b/test/test_extractors.py @@ -58,7 +58,9 @@ skip = [ "exhentai", "kissmanga", "mangafox", "dynastyscans", "nijie", "archivedmoe", "archiveofsins", "thebarchive", # temporary issues - "twitter", + "readcomiconline", # server down + "twitter", # ads + "yonkouprod", # everything is gone ] # enable selective testing for direct calls if __name__ == '__main__' and len(sys.argv) > 1: