[simplyhentai] fix image and video URLs
This commit is contained in:
@@ -71,7 +71,7 @@ class ThreedeebooruPopularExtractor(booru.MoebooruPopularMixin,
|
|||||||
r"/post/popular_(?P<scale>by_(?:day|week|month)|recent)"
|
r"/post/popular_(?P<scale>by_(?:day|week|month)|recent)"
|
||||||
r"(?:\?(?P<query>[^#]*))?")
|
r"(?:\?(?P<query>[^#]*))?")
|
||||||
test = ("http://behoimi.org/post/popular_by_month?month=2&year=2013", {
|
test = ("http://behoimi.org/post/popular_by_month?month=2&year=2013", {
|
||||||
"url": "c70268dce441a9ccc3383c244ec15edb059f494f",
|
"url": "f5a26c624da9a3d1dbc610e4a614bc57df6251c5",
|
||||||
"count": 20,
|
"count": 20,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ class SimplyhentaiGalleryExtractor(GalleryExtractor):
|
|||||||
test = (
|
test = (
|
||||||
(("https://original-work.simply-hentai.com"
|
(("https://original-work.simply-hentai.com"
|
||||||
"/amazon-no-hiyaku-amazon-elixir"), {
|
"/amazon-no-hiyaku-amazon-elixir"), {
|
||||||
"url": "258289249990502c3138719cb89e995a60861e49",
|
"url": "21613585ae5ec2f69ea579e9713f536fceab5bd5",
|
||||||
"keyword": "eba83ccdbab3022a2280c77aa747f9458196138b",
|
"keyword": "bf75f9ff0fb60756b1b9b92403526a72d9178d23",
|
||||||
}),
|
}),
|
||||||
("https://www.simply-hentai.com/notfound", {
|
("https://www.simply-hentai.com/notfound", {
|
||||||
"exception": exception.GalleryDLException,
|
"exception": exception.GalleryDLException,
|
||||||
@@ -112,6 +112,9 @@ class SimplyhentaiImageExtractor(Extractor):
|
|||||||
else:
|
else:
|
||||||
tags = []
|
tags = []
|
||||||
|
|
||||||
|
if url.startswith("//"):
|
||||||
|
url = "https:" + url
|
||||||
|
|
||||||
data = text.nameext_from_url(url, {
|
data = text.nameext_from_url(url, {
|
||||||
"title": text.unescape(title) if title else "",
|
"title": text.unescape(title) if title else "",
|
||||||
"tags": tags,
|
"tags": tags,
|
||||||
@@ -170,6 +173,9 @@ class SimplyhentaiVideoExtractor(Extractor):
|
|||||||
video_url = text.extract(embed_page, '"file":"', '"')[0]
|
video_url = text.extract(embed_page, '"file":"', '"')[0]
|
||||||
title, _, episode = title.rpartition(" Episode ")
|
title, _, episode = title.rpartition(" Episode ")
|
||||||
|
|
||||||
|
if video_url.startswith("//"):
|
||||||
|
video_url = "https:" + video_url
|
||||||
|
|
||||||
data = text.nameext_from_url(video_url, {
|
data = text.nameext_from_url(video_url, {
|
||||||
"title": text.unescape(title),
|
"title": text.unescape(title),
|
||||||
"episode": text.parse_int(episode),
|
"episode": text.parse_int(episode),
|
||||||
|
|||||||
Reference in New Issue
Block a user