aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/imgth.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/extractor/imgth.py')
-rw-r--r--gallery_dl/extractor/imgth.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/gallery_dl/extractor/imgth.py b/gallery_dl/extractor/imgth.py
index 3aa7922..7e5e6cf 100644
--- a/gallery_dl/extractor/imgth.py
+++ b/gallery_dl/extractor/imgth.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2015-2023 Mike Fährmann
+# Copyright 2015-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 ImgthGalleryExtractor(GalleryExtractor):
example = "https://imgth.com/gallery/123/TITLE"
def __init__(self, match):
- self.gallery_id = gid = match.group(1)
- url = "{}/gallery/{}/g/".format(self.root, gid)
+ self.gallery_id = gid = match[1]
+ url = f"{self.root}/gallery/{gid}/g/"
GalleryExtractor.__init__(self, match, url)
def metadata(self, page):
@@ -45,12 +45,11 @@ class ImgthGalleryExtractor(GalleryExtractor):
thumbs = text.extr(page, '<ul class="thumbnails">', '</ul>')
for url in text.extract_iter(thumbs, '<img src="', '"'):
path = url.partition("/thumbs/")[2]
- yield ("{}/images/{}".format(self.root, path), None)
+ yield (f"{self.root}/images/{path}", None)
if '<li class="next">' not in page:
return
pnum += 1
- url = "{}/gallery/{}/g/page/{}".format(
- self.root, self.gallery_id, pnum)
+ url = f"{self.root}/gallery/{self.gallery_id}/g/page/{pnum}"
page = self.request(url).text