aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/hentainexus.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2025-07-31 01:22:01 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2025-07-31 01:22:01 -0400
commita6e995c093de8aae2e91a0787281bb34c0b871eb (patch)
tree2d79821b05300d34d8871eb6c9662b359a2de85d /gallery_dl/extractor/hentainexus.py
parent7672a750cb74bf31e21d76aad2776367fd476155 (diff)
New upstream version 1.30.2.upstream/1.30.2
Diffstat (limited to 'gallery_dl/extractor/hentainexus.py')
-rw-r--r--gallery_dl/extractor/hentainexus.py26
1 files changed, 12 insertions, 14 deletions
diff --git a/gallery_dl/extractor/hentainexus.py b/gallery_dl/extractor/hentainexus.py
index 286ee38..d3901ac 100644
--- a/gallery_dl/extractor/hentainexus.py
+++ b/gallery_dl/extractor/hentainexus.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2019-2024 Mike Fährmann
+# Copyright 2019-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
@@ -22,8 +22,8 @@ class HentainexusGalleryExtractor(GalleryExtractor):
example = "https://hentainexus.com/view/12345"
def __init__(self, match):
- self.gallery_id = match.group(1)
- url = "{}/view/{}".format(self.root, self.gallery_id)
+ self.gallery_id = match[1]
+ url = f"{self.root}/view/{self.gallery_id}"
GalleryExtractor.__init__(self, match, url)
def metadata(self, page):
@@ -59,7 +59,7 @@ class HentainexusGalleryExtractor(GalleryExtractor):
return data
def images(self, _):
- url = "{}/read/{}".format(self.root, self.gallery_id)
+ url = f"{self.root}/read/{self.gallery_id}"
page = self.request(url).text
imgs = util.json_loads(self._decode(text.extr(
page, 'initReader("', '"')))
@@ -78,8 +78,7 @@ class HentainexusGalleryExtractor(GalleryExtractor):
pass
return results
- @staticmethod
- def _decode(data):
+ def _decode(self, data):
# https://hentainexus.com/static/js/reader.min.js?r=22
hostname = "hentainexus.com"
primes = (2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53)
@@ -118,8 +117,7 @@ class HentainexusGalleryExtractor(GalleryExtractor):
return result
- @staticmethod
- def _join_title(data):
+ def _join_title(self, data):
event = data['event']
artist = data['artist']
circle = data['circle']
@@ -137,18 +135,18 @@ class HentainexusGalleryExtractor(GalleryExtractor):
jt = ''
if event:
- jt += '({}) '.format(event)
+ jt += f'({event}) '
if circle:
- jt += '[{} ({})] '.format(circle, artist)
+ jt += f'[{circle} ({artist})] '
else:
- jt += '[{}] '.format(artist)
+ jt += f'[{artist}] '
jt += title
if parody.lower() != 'original work':
- jt += ' ({})'.format(parody)
+ jt += f' ({parody})'
if book:
- jt += ' ({})'.format(book)
+ jt += f' ({book})'
if magazine:
- jt += ' ({})'.format(magazine)
+ jt += f' ({magazine})'
return jt