aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/hentaihand.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/extractor/hentaihand.py')
-rw-r--r--gallery_dl/extractor/hentaihand.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/gallery_dl/extractor/hentaihand.py b/gallery_dl/extractor/hentaihand.py
index f3f43c4..f4f9d86 100644
--- a/gallery_dl/extractor/hentaihand.py
+++ b/gallery_dl/extractor/hentaihand.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2020-2023 Mike Fährmann
+# Copyright 2020-2025 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
@@ -20,8 +20,8 @@ class HentaihandGalleryExtractor(GalleryExtractor):
example = "https://hentaihand.com/en/comic/TITLE"
def __init__(self, match):
- self.slug = match.group(1)
- url = "{}/api/comics/{}".format(self.root, self.slug)
+ self.slug = match[1]
+ url = f"{self.root}/api/comics/{self.slug}"
GalleryExtractor.__init__(self, match, url)
def metadata(self, page):
@@ -44,7 +44,7 @@ class HentaihandGalleryExtractor(GalleryExtractor):
return data
def images(self, _):
- info = self.request(self.gallery_url + "/images").json()
+ info = self.request_json(self.page_url + "/images")
return [(img["source_url"], img) for img in info["images"]]
@@ -68,8 +68,8 @@ class HentaihandTagExtractor(Extractor):
else:
tpl = self.type + "s"
- url = "{}/api/{}/{}".format(self.root, tpl, self.key)
- tid = self.request(url, notfound=self.type).json()["id"]
+ url = f"{self.root}/api/{tpl}/{self.key}"
+ tid = self.request_json(url, notfound=self.type)["id"]
url = self.root + "/api/comics"
params = {
@@ -82,10 +82,10 @@ class HentaihandTagExtractor(Extractor):
"duration": "day",
}
while True:
- info = self.request(url, params=params).json()
+ info = self.request_json(url, params=params)
for gallery in info["data"]:
- gurl = "{}/en/comic/{}".format(self.root, gallery["slug"])
+ gurl = f"{self.root}/en/comic/{gallery['slug']}"
gallery["_extractor"] = HentaihandGalleryExtractor
yield Message.Queue, gurl, gallery