[simplyhentai] fix image and video URLs

This commit is contained in:
Mike Fährmann
2019-09-16 21:37:16 +02:00
parent 15632a1570
commit 11ea689013
2 changed files with 9 additions and 3 deletions

View File

@@ -71,7 +71,7 @@ class ThreedeebooruPopularExtractor(booru.MoebooruPopularMixin,
r"/post/popular_(?P<scale>by_(?:day|week|month)|recent)"
r"(?:\?(?P<query>[^#]*))?")
test = ("http://behoimi.org/post/popular_by_month?month=2&year=2013", {
"url": "c70268dce441a9ccc3383c244ec15edb059f494f",
"url": "f5a26c624da9a3d1dbc610e4a614bc57df6251c5",
"count": 20,
})

View File

@@ -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),