From 11ea68901366f075ba446f2e8dd840e90e38a158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Mon, 16 Sep 2019 21:37:16 +0200 Subject: [PATCH] [simplyhentai] fix image and video URLs --- gallery_dl/extractor/3dbooru.py | 2 +- gallery_dl/extractor/simplyhentai.py | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gallery_dl/extractor/3dbooru.py b/gallery_dl/extractor/3dbooru.py index d0e59ad6..15f42076 100644 --- a/gallery_dl/extractor/3dbooru.py +++ b/gallery_dl/extractor/3dbooru.py @@ -71,7 +71,7 @@ class ThreedeebooruPopularExtractor(booru.MoebooruPopularMixin, r"/post/popular_(?Pby_(?:day|week|month)|recent)" r"(?:\?(?P[^#]*))?") test = ("http://behoimi.org/post/popular_by_month?month=2&year=2013", { - "url": "c70268dce441a9ccc3383c244ec15edb059f494f", + "url": "f5a26c624da9a3d1dbc610e4a614bc57df6251c5", "count": 20, }) diff --git a/gallery_dl/extractor/simplyhentai.py b/gallery_dl/extractor/simplyhentai.py index a6a3da0c..ba0fcf44 100644 --- a/gallery_dl/extractor/simplyhentai.py +++ b/gallery_dl/extractor/simplyhentai.py @@ -22,8 +22,8 @@ class SimplyhentaiGalleryExtractor(GalleryExtractor): test = ( (("https://original-work.simply-hentai.com" "/amazon-no-hiyaku-amazon-elixir"), { - "url": "258289249990502c3138719cb89e995a60861e49", - "keyword": "eba83ccdbab3022a2280c77aa747f9458196138b", + "url": "21613585ae5ec2f69ea579e9713f536fceab5bd5", + "keyword": "bf75f9ff0fb60756b1b9b92403526a72d9178d23", }), ("https://www.simply-hentai.com/notfound", { "exception": exception.GalleryDLException, @@ -112,6 +112,9 @@ class SimplyhentaiImageExtractor(Extractor): else: tags = [] + if url.startswith("//"): + url = "https:" + url + data = text.nameext_from_url(url, { "title": text.unescape(title) if title else "", "tags": tags, @@ -170,6 +173,9 @@ class SimplyhentaiVideoExtractor(Extractor): video_url = text.extract(embed_page, '"file":"', '"')[0] title, _, episode = title.rpartition(" Episode ") + if video_url.startswith("//"): + video_url = "https:" + video_url + data = text.nameext_from_url(video_url, { "title": text.unescape(title), "episode": text.parse_int(episode),