diff --git a/gallery_dl/extractor/2ch.py b/gallery_dl/extractor/2ch.py
index dbbf21b6..e4381b64 100644
--- a/gallery_dl/extractor/2ch.py
+++ b/gallery_dl/extractor/2ch.py
@@ -68,7 +68,7 @@ class _2chBoardExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.board = match.group(1)
+ self.board = match[1]
def items(self):
# index page
diff --git a/gallery_dl/extractor/2chen.py b/gallery_dl/extractor/2chen.py
index 0c978897..3fb16a24 100644
--- a/gallery_dl/extractor/2chen.py
+++ b/gallery_dl/extractor/2chen.py
@@ -86,7 +86,7 @@ class _2chenBoardExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.board = match.group(1)
+ self.board = match[1]
def items(self):
url = "{}/{}/catalog".format(self.root, self.board)
diff --git a/gallery_dl/extractor/35photo.py b/gallery_dl/extractor/35photo.py
index 6c18f4c7..6398bcbe 100644
--- a/gallery_dl/extractor/35photo.py
+++ b/gallery_dl/extractor/35photo.py
@@ -104,7 +104,7 @@ class _35photoUserExtractor(_35photoExtractor):
def __init__(self, match):
_35photoExtractor.__init__(self, match)
- self.user = match.group(1)
+ self.user = match[1]
self.user_id = 0
def metadata(self):
@@ -133,7 +133,7 @@ class _35photoTagExtractor(_35photoExtractor):
def __init__(self, match):
_35photoExtractor.__init__(self, match)
- self.tag = match.group(1)
+ self.tag = match[1]
def metadata(self):
return {"search_tag": text.unquote(self.tag).lower()}
@@ -198,7 +198,7 @@ class _35photoImageExtractor(_35photoExtractor):
def __init__(self, match):
_35photoExtractor.__init__(self, match)
- self.photo_id = match.group(1)
+ self.photo_id = match[1]
def photos(self):
return (self.photo_id,)
diff --git a/gallery_dl/extractor/4archive.py b/gallery_dl/extractor/4archive.py
index cc48c44d..ed61b6f5 100644
--- a/gallery_dl/extractor/4archive.py
+++ b/gallery_dl/extractor/4archive.py
@@ -93,8 +93,8 @@ class _4archiveBoardExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.board = match.group(1)
- self.num = text.parse_int(match.group(2), 1)
+ self.board = match[1]
+ self.num = text.parse_int(match[2], 1)
def items(self):
data = {"_extractor": _4archiveThreadExtractor}
diff --git a/gallery_dl/extractor/4chan.py b/gallery_dl/extractor/4chan.py
index 2db60422..710cefcd 100644
--- a/gallery_dl/extractor/4chan.py
+++ b/gallery_dl/extractor/4chan.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
@@ -59,7 +59,7 @@ class _4chanBoardExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.board = match.group(1)
+ self.board = match[1]
def items(self):
url = "https://a.4cdn.org/{}/threads.json".format(self.board)
diff --git a/gallery_dl/extractor/500px.py b/gallery_dl/extractor/500px.py
index 41cc0deb..967b5a8b 100644
--- a/gallery_dl/extractor/500px.py
+++ b/gallery_dl/extractor/500px.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2019-2023 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
@@ -97,7 +97,7 @@ class _500pxUserExtractor(_500pxExtractor):
def __init__(self, match):
_500pxExtractor.__init__(self, match)
- self.user = match.group(1)
+ self.user = match[1]
def photos(self):
variables = {"username": self.user, "pageSize": 20}
@@ -207,7 +207,7 @@ class _500pxImageExtractor(_500pxExtractor):
def __init__(self, match):
_500pxExtractor.__init__(self, match)
- self.photo_id = match.group(1)
+ self.photo_id = match[1]
def photos(self):
edges = ({"node": {"legacyId": self.photo_id}},)
diff --git a/gallery_dl/extractor/8chan.py b/gallery_dl/extractor/8chan.py
index 3e30ddc4..71b5a839 100644
--- a/gallery_dl/extractor/8chan.py
+++ b/gallery_dl/extractor/8chan.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2022-2023 Mike Fährmann
+# Copyright 2022-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
@@ -23,7 +23,7 @@ class _8chanExtractor(Extractor):
root = "https://8chan.moe"
def __init__(self, match):
- self.root = "https://8chan." + match.group(1)
+ self.root = "https://8chan." + match[1]
Extractor.__init__(self, match)
@memcache()
diff --git a/gallery_dl/extractor/8muses.py b/gallery_dl/extractor/8muses.py
index 5b6bf45f..21c0ca0f 100644
--- a/gallery_dl/extractor/8muses.py
+++ b/gallery_dl/extractor/8muses.py
@@ -26,8 +26,8 @@ class _8musesAlbumExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.path = match.group(1)
- self.params = match.group(2) or ""
+ self.path = match[1]
+ self.params = match[2] or ""
def items(self):
url = self.root + self.path + self.params
diff --git a/gallery_dl/extractor/adultempire.py b/gallery_dl/extractor/adultempire.py
index bc168279..bb87189a 100644
--- a/gallery_dl/extractor/adultempire.py
+++ b/gallery_dl/extractor/adultempire.py
@@ -22,7 +22,7 @@ class AdultempireGalleryExtractor(GalleryExtractor):
def __init__(self, match):
GalleryExtractor.__init__(self, match)
- self.gallery_id = match.group(2)
+ self.gallery_id = match[2]
def _init(self):
self.cookies.set("ageConfirmed", "true", domain="www.adultempire.com")
diff --git a/gallery_dl/extractor/architizer.py b/gallery_dl/extractor/architizer.py
index 2d638fc3..202245da 100644
--- a/gallery_dl/extractor/architizer.py
+++ b/gallery_dl/extractor/architizer.py
@@ -24,7 +24,7 @@ class ArchitizerProjectExtractor(GalleryExtractor):
example = "https://architizer.com/projects/NAME/"
def __init__(self, match):
- url = "{}/projects/{}/".format(self.root, match.group(1))
+ url = "{}/projects/{}/".format(self.root, match[1])
GalleryExtractor.__init__(self, match, url)
def metadata(self, page):
@@ -68,7 +68,7 @@ class ArchitizerFirmExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.firm = match.group(1)
+ self.firm = match[1]
def items(self):
url = url = "{}/firms/{}/?requesting_merlin=pages".format(
diff --git a/gallery_dl/extractor/artstation.py b/gallery_dl/extractor/artstation.py
index 15d9029c..49a33948 100644
--- a/gallery_dl/extractor/artstation.py
+++ b/gallery_dl/extractor/artstation.py
@@ -25,7 +25,7 @@ class ArtstationExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.user = match.group(1) or match.group(2)
+ self.user = match[1] or match[2]
def _init(self):
self.session.headers["Cache-Control"] = "max-age=0"
@@ -215,7 +215,7 @@ class ArtstationAlbumExtractor(ArtstationExtractor):
def __init__(self, match):
ArtstationExtractor.__init__(self, match)
- self.album_id = text.parse_int(match.group(3))
+ self.album_id = text.parse_int(match[3])
def metadata(self):
userinfo = self.get_user_info(self.user)
@@ -264,7 +264,7 @@ class ArtstationCollectionExtractor(ArtstationExtractor):
def __init__(self, match):
ArtstationExtractor.__init__(self, match)
- self.collection_id = match.group(2)
+ self.collection_id = match[2]
def metadata(self):
url = "{}/collections/{}.json".format(
@@ -314,8 +314,8 @@ class ArtstationChallengeExtractor(ArtstationExtractor):
def __init__(self, match):
ArtstationExtractor.__init__(self, match)
- self.challenge_id = match.group(1)
- self.sorting = match.group(2) or "popular"
+ self.challenge_id = match[1]
+ self.sorting = match[2] or "popular"
def items(self):
challenge_url = "{}/contests/_/challenges/{}.json".format(
@@ -359,7 +359,7 @@ class ArtstationSearchExtractor(ArtstationExtractor):
def __init__(self, match):
ArtstationExtractor.__init__(self, match)
- self.params = query = text.parse_query(match.group(1))
+ self.params = query = text.parse_query(match[1])
self.query = text.unquote(query.get("query") or query.get("q", ""))
self.sorting = query.get("sort_by", "relevance").lower()
self.tags = query.get("tags", "").split(",")
@@ -406,7 +406,7 @@ class ArtstationArtworkExtractor(ArtstationExtractor):
def __init__(self, match):
ArtstationExtractor.__init__(self, match)
- self.query = text.parse_query(match.group(1))
+ self.query = text.parse_query(match[1])
def metadata(self):
return {"artwork": self.query}
@@ -426,7 +426,7 @@ class ArtstationImageExtractor(ArtstationExtractor):
def __init__(self, match):
ArtstationExtractor.__init__(self, match)
- self.project_id = match.group(1)
+ self.project_id = match[1]
self.assets = None
def metadata(self):
diff --git a/gallery_dl/extractor/aryion.py b/gallery_dl/extractor/aryion.py
index f251360e..55bc2c32 100644
--- a/gallery_dl/extractor/aryion.py
+++ b/gallery_dl/extractor/aryion.py
@@ -29,7 +29,7 @@ class AryionExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.user = match.group(1)
+ self.user = match[1]
self.recursive = True
def login(self):
diff --git a/gallery_dl/extractor/behance.py b/gallery_dl/extractor/behance.py
index b549bb18..ef1424dd 100644
--- a/gallery_dl/extractor/behance.py
+++ b/gallery_dl/extractor/behance.py
@@ -88,7 +88,7 @@ class BehanceGalleryExtractor(BehanceExtractor):
def __init__(self, match):
BehanceExtractor.__init__(self, match)
- self.gallery_id = match.group(1)
+ self.gallery_id = match[1]
def _init(self):
BehanceExtractor._init(self)
@@ -229,7 +229,7 @@ class BehanceUserExtractor(BehanceExtractor):
def __init__(self, match):
BehanceExtractor.__init__(self, match)
- self.user = match.group(1)
+ self.user = match[1]
def galleries(self):
endpoint = "GetProfileProjects"
@@ -257,7 +257,7 @@ class BehanceCollectionExtractor(BehanceExtractor):
def __init__(self, match):
BehanceExtractor.__init__(self, match)
- self.collection_id = match.group(1)
+ self.collection_id = match[1]
def galleries(self):
endpoint = "GetMoodboardItemsAndRecommendations"
diff --git a/gallery_dl/extractor/blogger.py b/gallery_dl/extractor/blogger.py
index f85c4f70..9e0887f5 100644
--- a/gallery_dl/extractor/blogger.py
+++ b/gallery_dl/extractor/blogger.py
@@ -104,7 +104,7 @@ class BloggerPostExtractor(BloggerExtractor):
def __init__(self, match):
BloggerExtractor.__init__(self, match)
- self.path = match.group(match.lastindex)
+ self.path = match[match.lastindex]
def posts(self, blog):
return (self.api.post_by_path(blog["id"], self.path),)
@@ -128,7 +128,7 @@ class BloggerSearchExtractor(BloggerExtractor):
def __init__(self, match):
BloggerExtractor.__init__(self, match)
- self.query = text.unquote(match.group(match.lastindex))
+ self.query = text.unquote(match[match.lastindex])
def posts(self, blog):
return self.api.blog_search(blog["id"], self.query)
@@ -145,7 +145,7 @@ class BloggerLabelExtractor(BloggerExtractor):
def __init__(self, match):
BloggerExtractor.__init__(self, match)
- self.label = text.unquote(match.group(match.lastindex))
+ self.label = text.unquote(match[match.lastindex])
def posts(self, blog):
return self.api.blog_posts(blog["id"], self.label)
diff --git a/gallery_dl/extractor/cien.py b/gallery_dl/extractor/cien.py
index ff59f391..b286f9e3 100644
--- a/gallery_dl/extractor/cien.py
+++ b/gallery_dl/extractor/cien.py
@@ -20,7 +20,7 @@ class CienExtractor(Extractor):
request_interval = (1.0, 2.0)
def __init__(self, match):
- self.root = text.root_from_url(match.group(0))
+ self.root = text.root_from_url(match[0])
Extractor.__init__(self, match)
def _init(self):
diff --git a/gallery_dl/extractor/common.py b/gallery_dl/extractor/common.py
index 414a6fad..e6b335be 100644
--- a/gallery_dl/extractor/common.py
+++ b/gallery_dl/extractor/common.py
@@ -926,7 +926,7 @@ class BaseExtractor(Extractor):
if index:
self.category, self.root, info = self.instances[index-1]
if not self.root:
- self.root = text.root_from_url(self.match.group(0))
+ self.root = text.root_from_url(self.match[0])
self.config_instance = info.get
else:
self.root = group
diff --git a/gallery_dl/extractor/desktopography.py b/gallery_dl/extractor/desktopography.py
index 35bb2992..b0f29882 100644
--- a/gallery_dl/extractor/desktopography.py
+++ b/gallery_dl/extractor/desktopography.py
@@ -46,7 +46,7 @@ class DesktopographyExhibitionExtractor(DesktopographyExtractor):
def __init__(self, match):
DesktopographyExtractor.__init__(self, match)
- self.year = match.group(1)
+ self.year = match[1]
def items(self):
url = "{}/exhibition-{}/".format(self.root, self.year)
@@ -75,7 +75,7 @@ class DesktopographyEntryExtractor(DesktopographyExtractor):
def __init__(self, match):
DesktopographyExtractor.__init__(self, match)
- self.entry = match.group(1)
+ self.entry = match[1]
def items(self):
url = "{}/portfolios/{}".format(self.root, self.entry)
diff --git a/gallery_dl/extractor/deviantart.py b/gallery_dl/extractor/deviantart.py
index ed11f737..eef0aec0 100644
--- a/gallery_dl/extractor/deviantart.py
+++ b/gallery_dl/extractor/deviantart.py
@@ -36,7 +36,7 @@ class DeviantartExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.user = (match.group(1) or match.group(2) or "").lower()
+ self.user = (match[1] or match[2] or "").lower()
self.offset = 0
def _init(self):
@@ -227,7 +227,7 @@ class DeviantartExtractor(Extractor):
if txt is None:
continue
for match in DeviantartStashExtractor.pattern.finditer(txt):
- url = text.ensure_http_scheme(match.group(0))
+ url = text.ensure_http_scheme(match[0])
deviation["_extractor"] = DeviantartStashExtractor
yield Message.Queue, url, deviation
@@ -988,8 +988,8 @@ class DeviantartFolderExtractor(DeviantartExtractor):
def __init__(self, match):
DeviantartExtractor.__init__(self, match)
self.folder = None
- self.folder_id = match.group(3)
- self.folder_name = match.group(4)
+ self.folder_id = match[3]
+ self.folder_name = match[4]
def deviations(self):
folders = self.api.gallery_folders(self.user)
@@ -1123,8 +1123,8 @@ class DeviantartCollectionExtractor(DeviantartExtractor):
def __init__(self, match):
DeviantartExtractor.__init__(self, match)
self.collection = None
- self.collection_id = match.group(3)
- self.collection_name = match.group(4)
+ self.collection_id = match[3]
+ self.collection_name = match[4]
def deviations(self):
folders = self.api.collections_folders(self.user)
@@ -1226,7 +1226,7 @@ class DeviantartTagExtractor(DeviantartExtractor):
def __init__(self, match):
DeviantartExtractor.__init__(self, match)
- self.tag = text.unquote(match.group(1))
+ self.tag = text.unquote(match[1])
self.user = ""
def deviations(self):
@@ -1276,9 +1276,9 @@ class DeviantartDeviationExtractor(DeviantartExtractor):
def __init__(self, match):
DeviantartExtractor.__init__(self, match)
- self.type = match.group(3)
+ self.type = match[3]
self.deviation_id = \
- match.group(4) or match.group(5) or id_from_base36(match.group(6))
+ match[4] or match[5] or id_from_base36(match[6])
def deviations(self):
if self.user:
@@ -1399,7 +1399,7 @@ class DeviantartGallerySearchExtractor(DeviantartExtractor):
def __init__(self, match):
DeviantartExtractor.__init__(self, match)
- self.query = match.group(3)
+ self.query = match[3]
def deviations(self):
self.login()
diff --git a/gallery_dl/extractor/dynastyscans.py b/gallery_dl/extractor/dynastyscans.py
index 5fb85ae8..f8abaaba 100644
--- a/gallery_dl/extractor/dynastyscans.py
+++ b/gallery_dl/extractor/dynastyscans.py
@@ -55,10 +55,10 @@ class DynastyscansChapterExtractor(DynastyscansBase, ChapterExtractor):
group = extr('"icon-print"> ', '')
return {
- "manga" : text.unescape(match.group(1)),
- "chapter" : text.parse_int(match.group(2)),
- "chapter_minor": match.group(3) or "",
- "title" : text.unescape(match.group(4) or ""),
+ "manga" : text.unescape(match[1]),
+ "chapter" : text.parse_int(match[2]),
+ "chapter_minor": match[3] or "",
+ "title" : text.unescape(match[4] or ""),
"author" : text.remove_html(author),
"group" : (text.remove_html(group) or
text.extr(group, ' alt="', '"')),
@@ -102,7 +102,7 @@ class DynastyscansSearchExtractor(DynastyscansBase, Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.query = match.group(1) or ""
+ self.query = match[1] or ""
def items(self):
yield Message.Directory, {}
diff --git a/gallery_dl/extractor/exhentai.py b/gallery_dl/extractor/exhentai.py
index 8b6cfdb8..19cfad66 100644
--- a/gallery_dl/extractor/exhentai.py
+++ b/gallery_dl/extractor/exhentai.py
@@ -34,7 +34,7 @@ class ExhentaiExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.version = match.group(1)
+ self.version = match[1]
def initialize(self):
domain = self.config("domain", "auto")
@@ -122,10 +122,10 @@ class ExhentaiGalleryExtractor(ExhentaiExtractor):
def __init__(self, match):
ExhentaiExtractor.__init__(self, match)
- self.gallery_id = text.parse_int(match.group(2) or match.group(5))
- self.gallery_token = match.group(3)
- self.image_token = match.group(4)
- self.image_num = text.parse_int(match.group(6), 1)
+ self.gallery_id = text.parse_int(match[2] or match[5])
+ self.gallery_token = match[3]
+ self.image_token = match[4]
+ self.image_num = text.parse_int(match[6], 1)
self.key_start = None
self.key_show = None
self.key_next = None
@@ -573,7 +573,7 @@ class ExhentaiSearchExtractor(ExhentaiExtractor):
def __init__(self, match):
ExhentaiExtractor.__init__(self, match)
- _, query, tag = match.groups()
+ _, query, tag = self.groups
if tag:
if "+" in tag:
ns, _, tag = tag.rpartition(":")
@@ -599,13 +599,13 @@ class ExhentaiSearchExtractor(ExhentaiExtractor):
last = None
page = self.request(search_url, params=params).text
- for gallery in ExhentaiGalleryExtractor.pattern.finditer(page):
- url = gallery.group(0)
+ for match in ExhentaiGalleryExtractor.pattern.finditer(page):
+ url = match[0]
if url == last:
continue
last = url
- data["gallery_id"] = text.parse_int(gallery.group(2))
- data["gallery_token"] = gallery.group(3)
+ data["gallery_id"] = text.parse_int(match[2])
+ data["gallery_token"] = match[3]
yield Message.Queue, url + "/", data
next_url = text.extr(page, 'nexturl="', '"', None)
diff --git a/gallery_dl/extractor/fanbox.py b/gallery_dl/extractor/fanbox.py
index 6964db00..e58d6512 100644
--- a/gallery_dl/extractor/fanbox.py
+++ b/gallery_dl/extractor/fanbox.py
@@ -351,7 +351,7 @@ class FanboxCreatorExtractor(FanboxExtractor):
def __init__(self, match):
FanboxExtractor.__init__(self, match)
- self.creator_id = match.group(1) or match.group(2)
+ self.creator_id = match[1] or match[2]
def posts(self):
url = "https://api.fanbox.cc/post.paginateCreator?creatorId="
@@ -378,7 +378,7 @@ class FanboxPostExtractor(FanboxExtractor):
def __init__(self, match):
FanboxExtractor.__init__(self, match)
- self.post_id = match.group(3)
+ self.post_id = match[3]
def posts(self):
return (self._get_post_data(self.post_id),)
diff --git a/gallery_dl/extractor/fantia.py b/gallery_dl/extractor/fantia.py
index db29589d..64491fcd 100644
--- a/gallery_dl/extractor/fantia.py
+++ b/gallery_dl/extractor/fantia.py
@@ -186,7 +186,7 @@ class FantiaCreatorExtractor(FantiaExtractor):
def __init__(self, match):
FantiaExtractor.__init__(self, match)
- self.creator_id = match.group(1)
+ self.creator_id = match[1]
def posts(self):
url = "{}/fanclubs/{}/posts".format(self.root, self.creator_id)
@@ -201,7 +201,7 @@ class FantiaPostExtractor(FantiaExtractor):
def __init__(self, match):
FantiaExtractor.__init__(self, match)
- self.post_id = match.group(1)
+ self.post_id = match[1]
def posts(self):
self._csrf_token()
diff --git a/gallery_dl/extractor/fapachi.py b/gallery_dl/extractor/fapachi.py
index 43627e27..6be2d626 100644
--- a/gallery_dl/extractor/fapachi.py
+++ b/gallery_dl/extractor/fapachi.py
@@ -50,8 +50,8 @@ class FapachiUserExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.user = match.group(1)
- self.num = text.parse_int(match.group(2), 1)
+ self.user = match[1]
+ self.num = text.parse_int(match[2], 1)
def items(self):
data = {"_extractor": FapachiPostExtractor}
diff --git a/gallery_dl/extractor/fapello.py b/gallery_dl/extractor/fapello.py
index cf18edc5..4ee464a5 100644
--- a/gallery_dl/extractor/fapello.py
+++ b/gallery_dl/extractor/fapello.py
@@ -25,7 +25,7 @@ class FapelloPostExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.root = text.root_from_url(match.group(0))
+ self.root = text.root_from_url(match[0])
self.model, self.id = match.groups()
def items(self):
@@ -59,8 +59,8 @@ class FapelloModelExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.root = text.root_from_url(match.group(0))
- self.model = match.group(1)
+ self.root = text.root_from_url(match[0])
+ self.model = match[1]
def items(self):
num = 1
@@ -93,8 +93,8 @@ class FapelloPathExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.root = text.root_from_url(match.group(0))
- self.path = match.group(1)
+ self.root = text.root_from_url(match[0])
+ self.path = match[1]
def items(self):
num = 1
diff --git a/gallery_dl/extractor/foolfuuka.py b/gallery_dl/extractor/foolfuuka.py
index c0c138fc..610e1cd1 100644
--- a/gallery_dl/extractor/foolfuuka.py
+++ b/gallery_dl/extractor/foolfuuka.py
@@ -273,9 +273,9 @@ class FoolfuukaGalleryExtractor(FoolfuukaExtractor):
def __init__(self, match):
FoolfuukaExtractor.__init__(self, match)
- board = match.group(match.lastindex)
+ board = match[match.lastindex]
if board.isdecimal():
- self.board = match.group(match.lastindex-1)
+ self.board = match[match.lastindex-1]
self.pages = (board,)
else:
self.board = board
diff --git a/gallery_dl/extractor/foolslide.py b/gallery_dl/extractor/foolslide.py
index 444f5e33..cf8f71e2 100644
--- a/gallery_dl/extractor/foolslide.py
+++ b/gallery_dl/extractor/foolslide.py
@@ -18,7 +18,7 @@ class FoolslideExtractor(BaseExtractor):
def __init__(self, match):
BaseExtractor.__init__(self, match)
- self.gallery_url = self.root + match.group(match.lastindex)
+ self.gallery_url = self.root + match[match.lastindex]
def request(self, url):
return BaseExtractor.request(
diff --git a/gallery_dl/extractor/furaffinity.py b/gallery_dl/extractor/furaffinity.py
index 968021da..395d47d1 100644
--- a/gallery_dl/extractor/furaffinity.py
+++ b/gallery_dl/extractor/furaffinity.py
@@ -28,7 +28,7 @@ class FuraffinityExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.user = match.group(1)
+ self.user = match[1]
self.offset = 0
def _init(self):
@@ -297,7 +297,7 @@ class FuraffinitySearchExtractor(FuraffinityExtractor):
def __init__(self, match):
FuraffinityExtractor.__init__(self, match)
- self.query = text.parse_query(match.group(2))
+ self.query = text.parse_query(match[2])
if self.user and "q" not in self.query:
self.query["q"] = text.unquote(self.user)
diff --git a/gallery_dl/extractor/fuskator.py b/gallery_dl/extractor/fuskator.py
index 675e1f85..fa5ec171 100644
--- a/gallery_dl/extractor/fuskator.py
+++ b/gallery_dl/extractor/fuskator.py
@@ -21,7 +21,7 @@ class FuskatorGalleryExtractor(GalleryExtractor):
example = "https://fuskator.com/thumbs/ID/"
def __init__(self, match):
- self.gallery_hash = match.group(1)
+ self.gallery_hash = match[1]
url = "{}/thumbs/{}/index.html".format(self.root, self.gallery_hash)
GalleryExtractor.__init__(self, match, url)
@@ -72,7 +72,7 @@ class FuskatorSearchExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.path = match.group(1)
+ self.path = match[1]
def items(self):
url = self.root + self.path
diff --git a/gallery_dl/extractor/gelbooru.py b/gallery_dl/extractor/gelbooru.py
index 24f7b886..fdc0764c 100644
--- a/gallery_dl/extractor/gelbooru.py
+++ b/gallery_dl/extractor/gelbooru.py
@@ -292,7 +292,7 @@ class GelbooruRedirectExtractor(GelbooruBase, Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.url_base64 = match.group(1)
+ self.url_base64 = match[1]
def items(self):
url = text.ensure_http_scheme(binascii.a2b_base64(
diff --git a/gallery_dl/extractor/gelbooru_v01.py b/gallery_dl/extractor/gelbooru_v01.py
index 0b96048b..4ba17518 100644
--- a/gallery_dl/extractor/gelbooru_v01.py
+++ b/gallery_dl/extractor/gelbooru_v01.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2021-2023 Mike Fährmann
+# Copyright 2021-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
@@ -94,7 +94,7 @@ class GelbooruV01TagExtractor(GelbooruV01Extractor):
def __init__(self, match):
GelbooruV01Extractor.__init__(self, match)
- self.tags = match.group(match.lastindex)
+ self.tags = match[match.lastindex]
def metadata(self):
return {"search_tags": text.unquote(self.tags.replace("+", " "))}
@@ -115,7 +115,7 @@ class GelbooruV01FavoriteExtractor(GelbooruV01Extractor):
def __init__(self, match):
GelbooruV01Extractor.__init__(self, match)
- self.favorite_id = match.group(match.lastindex)
+ self.favorite_id = match[match.lastindex]
def metadata(self):
return {"favorite_id": text.parse_int(self.favorite_id)}
@@ -134,7 +134,7 @@ class GelbooruV01PostExtractor(GelbooruV01Extractor):
def __init__(self, match):
GelbooruV01Extractor.__init__(self, match)
- self.post_id = match.group(match.lastindex)
+ self.post_id = match[match.lastindex]
def posts(self):
return (self._parse_post(self.post_id),)
diff --git a/gallery_dl/extractor/gelbooru_v02.py b/gallery_dl/extractor/gelbooru_v02.py
index 69b5f1cd..812010ec 100644
--- a/gallery_dl/extractor/gelbooru_v02.py
+++ b/gallery_dl/extractor/gelbooru_v02.py
@@ -163,7 +163,7 @@ class GelbooruV02TagExtractor(GelbooruV02Extractor):
def __init__(self, match):
GelbooruV02Extractor.__init__(self, match)
- tags = match.group(match.lastindex)
+ tags = match[match.lastindex]
self.tags = text.unquote(tags.replace("+", " "))
def metadata(self):
@@ -184,7 +184,7 @@ class GelbooruV02PoolExtractor(GelbooruV02Extractor):
def __init__(self, match):
GelbooruV02Extractor.__init__(self, match)
- self.pool_id = match.group(match.lastindex)
+ self.pool_id = match[match.lastindex]
if self.category == "rule34":
self.posts = self._posts_pages
@@ -236,7 +236,7 @@ class GelbooruV02FavoriteExtractor(GelbooruV02Extractor):
def __init__(self, match):
GelbooruV02Extractor.__init__(self, match)
- self.favorite_id = match.group(match.lastindex)
+ self.favorite_id = match[match.lastindex]
def metadata(self):
return {"favorite_id": text.parse_int(self.favorite_id)}
@@ -257,7 +257,7 @@ class GelbooruV02PostExtractor(GelbooruV02Extractor):
def __init__(self, match):
GelbooruV02Extractor.__init__(self, match)
- self.post_id = match.group(match.lastindex)
+ self.post_id = match[match.lastindex]
def posts(self):
return self._pagination({"id": self.post_id})
diff --git a/gallery_dl/extractor/generic.py b/gallery_dl/extractor/generic.py
index bc108c00..407e4787 100644
--- a/gallery_dl/extractor/generic.py
+++ b/gallery_dl/extractor/generic.py
@@ -36,28 +36,28 @@ class GenericExtractor(Extractor):
example = "generic:https://www.nongnu.org/lzip/"
def __init__(self, match):
- self.subcategory = match.group('domain')
+ self.subcategory = match['domain']
Extractor.__init__(self, match)
# Strip the "g(eneric):" prefix
# and inform about "forced" or "fallback" mode
- if match.group('generic'):
- self.url = match.group(0).partition(":")[2]
+ if match['generic']:
+ self.url = match[0].partition(":")[2]
else:
self.log.info("Falling back on generic information extractor.")
- self.url = match.group(0)
+ self.url = match[0]
# Make sure we have a scheme, or use https
- if match.group('scheme'):
- self.scheme = match.group('scheme')
+ if match['scheme']:
+ self.scheme = match['scheme']
else:
self.scheme = 'https://'
self.url = text.ensure_http_scheme(self.url, self.scheme)
- self.path = match.group('path')
+ self.path = match['path']
# Used to resolve relative image urls
- self.root = self.scheme + match.group('domain')
+ self.root = self.scheme + match['domain']
def items(self):
"""Get page, extract metadata & images, yield them in suitable messages
@@ -184,7 +184,7 @@ class GenericExtractor(Extractor):
basematch = util.re(
r"(?i)(?:[^\"' >]+)").search(page)
if basematch:
- self.baseurl = basematch.group('url').rstrip('/')
+ self.baseurl = basematch['url'].rstrip('/')
# Otherwise, extract the base url from self.url
else:
if self.url.endswith("/"):
diff --git a/gallery_dl/extractor/gofile.py b/gallery_dl/extractor/gofile.py
index ef9ea608..5d23925e 100644
--- a/gallery_dl/extractor/gofile.py
+++ b/gallery_dl/extractor/gofile.py
@@ -23,7 +23,7 @@ class GofileFolderExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.content_id = match.group(1)
+ self.content_id = match[1]
def items(self):
recursive = self.config("recursive")
diff --git a/gallery_dl/extractor/hatenablog.py b/gallery_dl/extractor/hatenablog.py
index 7c899061..8e350d69 100644
--- a/gallery_dl/extractor/hatenablog.py
+++ b/gallery_dl/extractor/hatenablog.py
@@ -27,7 +27,7 @@ class HatenablogExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.domain = match.group(1) or match.group(2)
+ self.domain = match[1] or match[2]
def _init(self):
self._find_img = util.re(r'
]+)').finditer
@@ -42,8 +42,8 @@ class HatenablogExtractor(Extractor):
'
', '
')
images = []
- for i in self._find_img(content):
- attributes = i.group(1)
+ for match in self._find_img(content):
+ attributes = match[1]
if 'class="hatena-fotolife"' not in attributes:
continue
image = text.unescape(text.extr(attributes, 'src="', '"'))
@@ -67,9 +67,9 @@ class HatenablogEntriesExtractor(HatenablogExtractor):
def __init__(self, match):
HatenablogExtractor.__init__(self, match)
- self.path = match.group(3)
+ self.path = match[3]
self.query = {key: value for key, value in text.parse_query(
- match.group(4)).items() if self._acceptable_query(key)}
+ match[4]).items() if self._acceptable_query(key)}
def _init(self):
HatenablogExtractor._init(self)
@@ -91,7 +91,7 @@ class HatenablogEntriesExtractor(HatenablogExtractor):
yield from self._handle_full_articles(extr)
match = self._find_pager_url(page)
- url = text.unescape(match.group(1)) if match else None
+ url = text.unescape(match[1]) if match else None
query = None
def _handle_partial_articles(self, extr):
@@ -128,7 +128,7 @@ class HatenablogEntryExtractor(HatenablogExtractor):
def __init__(self, match):
HatenablogExtractor.__init__(self, match)
- self.path = match.group(3)
+ self.path = match[3]
def items(self):
url = "https://" + self.domain + "/entry/" + self.path
diff --git a/gallery_dl/extractor/hentaifoundry.py b/gallery_dl/extractor/hentaifoundry.py
index eceb989f..139d5463 100644
--- a/gallery_dl/extractor/hentaifoundry.py
+++ b/gallery_dl/extractor/hentaifoundry.py
@@ -25,8 +25,8 @@ class HentaifoundryExtractor(Extractor):
per_page = 25
def __init__(self, match):
- self.root = (match.group(1) or "https://") + "www.hentai-foundry.com"
- self.user = match.group(2)
+ self.root = (match[1] or "https://") + "www.hentai-foundry.com"
+ self.user = match[2]
Extractor.__init__(self, match)
self.page_url = ""
self.start_post = 0
@@ -306,7 +306,7 @@ class HentaifoundryImageExtractor(HentaifoundryExtractor):
def __init__(self, match):
HentaifoundryExtractor.__init__(self, match)
- self.index = match.group(3)
+ self.index = match[3]
def items(self):
post_url = "{}/pictures/user/{}/{}/?enterAgree=1".format(
@@ -347,7 +347,7 @@ class HentaifoundryStoryExtractor(HentaifoundryExtractor):
def __init__(self, match):
HentaifoundryExtractor.__init__(self, match)
- self.index = match.group(3)
+ self.index = match[3]
def items(self):
story_url = "{}/stories/user/{}/{}/x?enterAgree=1".format(
diff --git a/gallery_dl/extractor/hentaihand.py b/gallery_dl/extractor/hentaihand.py
index f3f43c47..d44c8afe 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,7 +20,7 @@ class HentaihandGalleryExtractor(GalleryExtractor):
example = "https://hentaihand.com/en/comic/TITLE"
def __init__(self, match):
- self.slug = match.group(1)
+ self.slug = match[1]
url = "{}/api/comics/{}".format(self.root, self.slug)
GalleryExtractor.__init__(self, match, url)
diff --git a/gallery_dl/extractor/hentaihere.py b/gallery_dl/extractor/hentaihere.py
index b346110b..1cdbca15 100644
--- a/gallery_dl/extractor/hentaihere.py
+++ b/gallery_dl/extractor/hentaihere.py
@@ -37,14 +37,14 @@ class HentaihereChapterExtractor(HentaihereBase, ChapterExtractor):
r"Page 1 \| (.+) \(([^)]+)\) - Chapter \d+: (.+) by "
r"(.+) at ").match(title)
return {
- "manga": match.group(1),
+ "manga": match[1],
"manga_id": text.parse_int(self.manga_id),
"chapter": text.parse_int(chapter),
"chapter_minor": sep + minor,
"chapter_id": text.parse_int(chapter_id),
- "type": match.group(2),
- "title": match.group(3),
- "author": match.group(4),
+ "type": match[2],
+ "title": match[3],
+ "author": match[4],
"lang": "en",
"language": "English",
}
diff --git a/gallery_dl/extractor/hentainexus.py b/gallery_dl/extractor/hentainexus.py
index b71b4ecf..0d88bd80 100644
--- a/gallery_dl/extractor/hentainexus.py
+++ b/gallery_dl/extractor/hentainexus.py
@@ -22,7 +22,7 @@ class HentainexusGalleryExtractor(GalleryExtractor):
example = "https://hentainexus.com/view/12345"
def __init__(self, match):
- self.gallery_id = match.group(1)
+ self.gallery_id = match[1]
url = "{}/view/{}".format(self.root, self.gallery_id)
GalleryExtractor.__init__(self, match, url)
diff --git a/gallery_dl/extractor/hiperdex.py b/gallery_dl/extractor/hiperdex.py
index ebdae098..dc8f57d0 100644
--- a/gallery_dl/extractor/hiperdex.py
+++ b/gallery_dl/extractor/hiperdex.py
@@ -129,8 +129,8 @@ class HiperdexArtistExtractor(HiperdexBase, MangaExtractor):
example = "https://hiperdex.com/manga-artist/NAME/"
def __init__(self, match):
- self.root = text.ensure_http_scheme(match.group(1))
- MangaExtractor.__init__(self, match, self.root + match.group(2) + "/")
+ self.root = text.ensure_http_scheme(match[1])
+ MangaExtractor.__init__(self, match, self.root + match[2] + "/")
def chapters(self, page):
results = []
diff --git a/gallery_dl/extractor/hitomi.py b/gallery_dl/extractor/hitomi.py
index e021c198..e4e12bca 100644
--- a/gallery_dl/extractor/hitomi.py
+++ b/gallery_dl/extractor/hitomi.py
@@ -198,7 +198,7 @@ class HitomiSearchExtractor(HitomiExtractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.query = match.group(1)
+ self.query = match[1]
self.tags = text.unquote(self.query)
def items(self):
@@ -269,9 +269,9 @@ def _parse_gg(extr):
for match in util.re_compile(
r"if\s+\(g\s*===?\s*(\d+)\)[\s{]*o\s*=\s*(\d+)").finditer(page):
- m[int(match.group(1))] = int(match.group(2))
+ m[int(match[1])] = int(match[2])
d = util.re_compile(r"(?:var\s|default:)\s*o\s*=\s*(\d+)").search(page)
b = util.re_compile(r"b:\s*[\"'](.+)[\"']").search(page)
- return m, b.group(1).strip("/"), int(d.group(1)) if d else 0
+ return m, b[1].strip("/"), int(d[1]) if d else 0
diff --git a/gallery_dl/extractor/hotleak.py b/gallery_dl/extractor/hotleak.py
index ddfc54b3..b11d60f0 100644
--- a/gallery_dl/extractor/hotleak.py
+++ b/gallery_dl/extractor/hotleak.py
@@ -103,7 +103,7 @@ class HotleakCreatorExtractor(HotleakExtractor):
def __init__(self, match):
HotleakExtractor.__init__(self, match)
- self.creator = match.group(1)
+ self.creator = match[1]
def posts(self):
url = "{}/{}".format(self.root, self.creator)
@@ -178,7 +178,7 @@ class HotleakSearchExtractor(HotleakExtractor):
def __init__(self, match):
HotleakExtractor.__init__(self, match)
- self.params = match.group(1)
+ self.params = match[1]
def items(self):
data = {"_extractor": HotleakCreatorExtractor}
diff --git a/gallery_dl/extractor/idolcomplex.py b/gallery_dl/extractor/idolcomplex.py
index 98fd2834..9a94df2f 100644
--- a/gallery_dl/extractor/idolcomplex.py
+++ b/gallery_dl/extractor/idolcomplex.py
@@ -159,7 +159,7 @@ class IdolcomplexTagExtractor(IdolcomplexExtractor):
def __init__(self, match):
IdolcomplexExtractor.__init__(self, match)
- query = text.parse_query(match.group(1))
+ query = text.parse_query(match[1])
self.tags = text.unquote(query.get("tags", "").replace("+", " "))
self.start_page = text.parse_int(query.get("page"), 1)
self.next = text.parse_int(query.get("next"), 0)
diff --git a/gallery_dl/extractor/imagebam.py b/gallery_dl/extractor/imagebam.py
index 3e468539..4264c575 100644
--- a/gallery_dl/extractor/imagebam.py
+++ b/gallery_dl/extractor/imagebam.py
@@ -19,7 +19,7 @@ class ImagebamExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.path = match.group(1)
+ self.path = match[1]
def _init(self):
self.cookies.set("nsfw_inter", "1", domain="www.imagebam.com")
diff --git a/gallery_dl/extractor/imagechest.py b/gallery_dl/extractor/imagechest.py
index 159feba0..30147ca4 100644
--- a/gallery_dl/extractor/imagechest.py
+++ b/gallery_dl/extractor/imagechest.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Leonid "Bepis" Pavel
-# Copyright 2023 Mike Fährmann
+# Copyright 2023-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
@@ -23,7 +23,7 @@ class ImagechestGalleryExtractor(GalleryExtractor):
example = "https://imgchest.com/p/abcdefghijk"
def __init__(self, match):
- self.gallery_id = match.group(1)
+ self.gallery_id = match[1]
url = self.root + "/p/" + self.gallery_id
GalleryExtractor.__init__(self, match, url)
diff --git a/gallery_dl/extractor/imagefap.py b/gallery_dl/extractor/imagefap.py
index f23e3781..ea44016c 100644
--- a/gallery_dl/extractor/imagefap.py
+++ b/gallery_dl/extractor/imagefap.py
@@ -45,7 +45,7 @@ class ImagefapGalleryExtractor(ImagefapExtractor):
def __init__(self, match):
ImagefapExtractor.__init__(self, match)
- self.gid = match.group(1)
+ self.gid = match[1]
self.image_id = ""
def items(self):
@@ -116,7 +116,7 @@ class ImagefapImageExtractor(ImagefapExtractor):
def __init__(self, match):
ImagefapExtractor.__init__(self, match)
- self.image_id = match.group(1)
+ self.image_id = match[1]
def items(self):
url, data = self.get_image()
diff --git a/gallery_dl/extractor/imagehosts.py b/gallery_dl/extractor/imagehosts.py
index c8c272ab..5b0de36d 100644
--- a/gallery_dl/extractor/imagehosts.py
+++ b/gallery_dl/extractor/imagehosts.py
@@ -28,8 +28,8 @@ class ImagehostImageExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
self.page_url = "http{}://{}".format(
- "s" if self._https else "", match.group(1))
- self.token = match.group(2)
+ "s" if self._https else "", match[1])
+ self.token = match[2]
if self._params == "simple":
self._params = {
diff --git a/gallery_dl/extractor/imgbb.py b/gallery_dl/extractor/imgbb.py
index b926cb21..95f8430a 100644
--- a/gallery_dl/extractor/imgbb.py
+++ b/gallery_dl/extractor/imgbb.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2019-2023 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
@@ -126,8 +126,8 @@ class ImgbbAlbumExtractor(ImgbbExtractor):
def __init__(self, match):
ImgbbExtractor.__init__(self, match)
self.album_name = None
- self.album_id = match.group(1)
- self.sort = text.parse_query(match.group(2)).get("sort", "date_desc")
+ self.album_id = match[1]
+ self.sort = text.parse_query(match[2]).get("sort", "date_desc")
self.page_url = "https://ibb.co/album/" + self.album_id
def metadata(self, page):
@@ -162,8 +162,8 @@ class ImgbbUserExtractor(ImgbbExtractor):
def __init__(self, match):
ImgbbExtractor.__init__(self, match)
- self.user = match.group(1)
- self.sort = text.parse_query(match.group(2)).get("sort", "date_desc")
+ self.user = match[1]
+ self.sort = text.parse_query(match[2]).get("sort", "date_desc")
self.page_url = "https://{}.imgbb.com/".format(self.user)
def metadata(self, page):
@@ -191,7 +191,7 @@ class ImgbbImageExtractor(ImgbbExtractor):
def __init__(self, match):
ImgbbExtractor.__init__(self, match)
- self.image_id = match.group(1)
+ self.image_id = match[1]
def items(self):
url = "https://ibb.co/" + self.image_id
diff --git a/gallery_dl/extractor/imgbox.py b/gallery_dl/extractor/imgbox.py
index 6428058c..d815e51c 100644
--- a/gallery_dl/extractor/imgbox.py
+++ b/gallery_dl/extractor/imgbox.py
@@ -62,7 +62,7 @@ class ImgboxGalleryExtractor(AsynchronousMixin, ImgboxExtractor):
def __init__(self, match):
ImgboxExtractor.__init__(self, match)
- self.gallery_key = match.group(1)
+ self.gallery_key = match[1]
self.image_keys = []
def get_job_metadata(self):
@@ -93,7 +93,7 @@ class ImgboxImageExtractor(ImgboxExtractor):
def __init__(self, match):
ImgboxExtractor.__init__(self, match)
- self.image_key = match.group(1)
+ self.image_key = match[1]
def get_image_keys(self):
return (self.image_key,)
diff --git a/gallery_dl/extractor/imgth.py b/gallery_dl/extractor/imgth.py
index 3aa79229..f93596ac 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,7 +20,7 @@ class ImgthGalleryExtractor(GalleryExtractor):
example = "https://imgth.com/gallery/123/TITLE"
def __init__(self, match):
- self.gallery_id = gid = match.group(1)
+ self.gallery_id = gid = match[1]
url = "{}/gallery/{}/g/".format(self.root, gid)
GalleryExtractor.__init__(self, match, url)
diff --git a/gallery_dl/extractor/imgur.py b/gallery_dl/extractor/imgur.py
index 171a0bf6..17d6030d 100644
--- a/gallery_dl/extractor/imgur.py
+++ b/gallery_dl/extractor/imgur.py
@@ -21,7 +21,7 @@ class ImgurExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.key = match.group(1)
+ self.key = match[1]
def _init(self):
self.api = ImgurAPI(self)
@@ -168,7 +168,7 @@ class ImgurFavoriteFolderExtractor(ImgurExtractor):
def __init__(self, match):
ImgurExtractor.__init__(self, match)
- self.folder_id = match.group(2)
+ self.folder_id = match[2]
def items(self):
return self._items_queue(self.api.account_favorites_folder(
diff --git a/gallery_dl/extractor/inkbunny.py b/gallery_dl/extractor/inkbunny.py
index 47e071ae..264611fd 100644
--- a/gallery_dl/extractor/inkbunny.py
+++ b/gallery_dl/extractor/inkbunny.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
@@ -109,12 +109,12 @@ class InkbunnyPoolExtractor(InkbunnyExtractor):
def __init__(self, match):
InkbunnyExtractor.__init__(self, match)
- pid = match.group(1)
+ pid = match[1]
if pid:
self.pool_id = pid
self.orderby = "pool_order"
else:
- params = text.parse_query(match.group(2))
+ params = text.parse_query(match[2])
self.pool_id = params.get("pool_id")
self.orderby = params.get("orderby", "pool_order")
@@ -142,12 +142,12 @@ class InkbunnyFavoriteExtractor(InkbunnyExtractor):
def __init__(self, match):
InkbunnyExtractor.__init__(self, match)
- uid = match.group(1)
+ uid = match[1]
if uid:
self.user_id = uid
self.orderby = self.config("orderby", "fav_datetime")
else:
- params = text.parse_query(match.group(2))
+ params = text.parse_query(match[2])
self.user_id = params.get("user_id")
self.orderby = params.get("orderby", "fav_datetime")
@@ -184,7 +184,7 @@ class InkbunnyUnreadExtractor(InkbunnyExtractor):
def __init__(self, match):
InkbunnyExtractor.__init__(self, match)
- self.params = text.parse_query(match.group(1))
+ self.params = text.parse_query(match[1])
def posts(self):
params = self.params.copy()
@@ -204,7 +204,7 @@ class InkbunnySearchExtractor(InkbunnyExtractor):
def __init__(self, match):
InkbunnyExtractor.__init__(self, match)
- self.params = text.parse_query(match.group(1))
+ self.params = text.parse_query(match[1])
def metadata(self):
return {"search": self.params}
@@ -241,8 +241,8 @@ class InkbunnyFollowingExtractor(InkbunnyExtractor):
def __init__(self, match):
InkbunnyExtractor.__init__(self, match)
- self.user_id = match.group(1) or \
- text.parse_query(match.group(2)).get("user_id")
+ self.user_id = match[1] or \
+ text.parse_query(match[2]).get("user_id")
def items(self):
url = self.root + "/watchlist_process.php"
@@ -276,7 +276,7 @@ class InkbunnyPostExtractor(InkbunnyExtractor):
def __init__(self, match):
InkbunnyExtractor.__init__(self, match)
- self.submission_id = match.group(1)
+ self.submission_id = match[1]
def posts(self):
submissions = self.api.detail(({"submission_id": self.submission_id},))
diff --git a/gallery_dl/extractor/instagram.py b/gallery_dl/extractor/instagram.py
index 77164527..435efbcd 100644
--- a/gallery_dl/extractor/instagram.py
+++ b/gallery_dl/extractor/instagram.py
@@ -33,7 +33,7 @@ class InstagramExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.item = match.group(1)
+ self.item = match[1]
def _init(self):
self.www_claim = "0"
@@ -513,7 +513,7 @@ class InstagramGuideExtractor(InstagramExtractor):
def __init__(self, match):
InstagramExtractor.__init__(self, match)
- self.guide_id = match.group(2)
+ self.guide_id = match[2]
def metadata(self):
return {"guide": self.api.guide(self.guide_id)}
diff --git a/gallery_dl/extractor/jschan.py b/gallery_dl/extractor/jschan.py
index 398256dc..8e06de24 100644
--- a/gallery_dl/extractor/jschan.py
+++ b/gallery_dl/extractor/jschan.py
@@ -36,8 +36,8 @@ class JschanThreadExtractor(JschanExtractor):
def __init__(self, match):
JschanExtractor.__init__(self, match)
index = match.lastindex
- self.board = match.group(index-1)
- self.thread = match.group(index)
+ self.board = match[index-1]
+ self.thread = match[index]
def items(self):
url = "{}/{}/thread/{}.json".format(
@@ -70,7 +70,7 @@ class JschanBoardExtractor(JschanExtractor):
def __init__(self, match):
JschanExtractor.__init__(self, match)
- self.board = match.group(match.lastindex)
+ self.board = match[match.lastindex]
def items(self):
url = "{}/{}/catalog.json".format(self.root, self.board)
diff --git a/gallery_dl/extractor/kabeuchi.py b/gallery_dl/extractor/kabeuchi.py
index 867f0da8..1206cd8a 100644
--- a/gallery_dl/extractor/kabeuchi.py
+++ b/gallery_dl/extractor/kabeuchi.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
@@ -25,7 +25,7 @@ class KabeuchiUserExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.user_id = match.group(1)
+ self.user_id = match[1]
def items(self):
base = "{}/accounts/upfile/{}/{}/".format(
diff --git a/gallery_dl/extractor/keenspot.py b/gallery_dl/extractor/keenspot.py
index 39ac7a18..35aa3b57 100644
--- a/gallery_dl/extractor/keenspot.py
+++ b/gallery_dl/extractor/keenspot.py
@@ -24,8 +24,8 @@ class KeenspotComicExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.comic = match.group(1).lower()
- self.path = match.group(2)
+ self.comic = match[1].lower()
+ self.path = match[2]
self.root = "http://" + self.comic + ".keenspot.com"
self._needle = ""
diff --git a/gallery_dl/extractor/kemono.py b/gallery_dl/extractor/kemono.py
index 035b617b..b51033f7 100644
--- a/gallery_dl/extractor/kemono.py
+++ b/gallery_dl/extractor/kemono.py
@@ -29,9 +29,9 @@ class KemonoExtractor(Extractor):
cookies_domain = ".kemono.su"
def __init__(self, match):
- tld = match.group(2)
- self.category = domain = match.group(1)
- self.root = text.root_from_url(match.group(0))
+ tld = match[2]
+ self.category = domain = match[1]
+ self.root = text.root_from_url(match[0])
self.cookies_domain = ".{}.{}".format(domain, tld)
Extractor.__init__(self, match)
@@ -125,7 +125,7 @@ class KemonoExtractor(Extractor):
match = find_hash(url)
if match:
- file["hash"] = hash = match.group(1)
+ file["hash"] = hash = match[1]
if not duplicates:
if hash in hashes:
self.log.debug("Skipping %s (duplicate)", url)
@@ -310,7 +310,7 @@ class KemonoUserExtractor(KemonoExtractor):
example = "https://kemono.su/SERVICE/user/12345"
def __init__(self, match):
- self.subcategory = match.group(3)
+ self.subcategory = match[3]
KemonoExtractor.__init__(self, match)
def posts(self):
@@ -356,7 +356,7 @@ class KemonoPostExtractor(KemonoExtractor):
example = "https://kemono.su/SERVICE/user/12345/post/12345"
def __init__(self, match):
- self.subcategory = match.group(3)
+ self.subcategory = match[3]
KemonoExtractor.__init__(self, match)
def posts(self):
@@ -423,7 +423,7 @@ class KemonoDiscordExtractor(KemonoExtractor):
append = files.append
for attachment in post["attachments"]:
match = find_hash(attachment["path"])
- attachment["hash"] = match.group(1) if match else ""
+ attachment["hash"] = match[1] if match else ""
attachment["type"] = "attachment"
append(attachment)
for path in find_inline(post["content"] or ""):
diff --git a/gallery_dl/extractor/khinsider.py b/gallery_dl/extractor/khinsider.py
index a0168d94..9c33d4fa 100644
--- a/gallery_dl/extractor/khinsider.py
+++ b/gallery_dl/extractor/khinsider.py
@@ -26,7 +26,7 @@ class KhinsiderSoundtrackExtractor(AsynchronousMixin, Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.album = match.group(1)
+ self.album = match[1]
def items(self):
url = self.root + "/game-soundtracks/album/" + self.album
diff --git a/gallery_dl/extractor/lexica.py b/gallery_dl/extractor/lexica.py
index d55d821e..7327f087 100644
--- a/gallery_dl/extractor/lexica.py
+++ b/gallery_dl/extractor/lexica.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2023 Mike Fährmann
+# Copyright 2023-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
@@ -24,7 +24,7 @@ class LexicaSearchExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.query = match.group(1)
+ self.query = match[1]
self.text = text.unquote(self.query).replace("+", " ")
def items(self):
diff --git a/gallery_dl/extractor/lightroom.py b/gallery_dl/extractor/lightroom.py
index 2cbaa976..b557149c 100644
--- a/gallery_dl/extractor/lightroom.py
+++ b/gallery_dl/extractor/lightroom.py
@@ -22,7 +22,7 @@ class LightroomGalleryExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.href = match.group(1)
+ self.href = match[1]
def items(self):
# Get config
diff --git a/gallery_dl/extractor/livedoor.py b/gallery_dl/extractor/livedoor.py
index e21659f0..91ace16d 100644
--- a/gallery_dl/extractor/livedoor.py
+++ b/gallery_dl/extractor/livedoor.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2019-2023 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,7 +22,7 @@ class LivedoorExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.user = match.group(1)
+ self.user = match[1]
def items(self):
for post in self.posts():
@@ -108,7 +108,7 @@ class LivedoorPostExtractor(LivedoorExtractor):
def __init__(self, match):
LivedoorExtractor.__init__(self, match)
- self.post_id = match.group(2)
+ self.post_id = match[2]
def posts(self):
url = "{}/{}/archives/{}.html".format(
diff --git a/gallery_dl/extractor/luscious.py b/gallery_dl/extractor/luscious.py
index 8e739640..afe07ae4 100644
--- a/gallery_dl/extractor/luscious.py
+++ b/gallery_dl/extractor/luscious.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2016-2023 Mike Fährmann
+# Copyright 2016-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
@@ -51,7 +51,7 @@ class LusciousAlbumExtractor(LusciousExtractor):
def __init__(self, match):
LusciousExtractor.__init__(self, match)
- self.album_id = match.group(1)
+ self.album_id = match[1]
def _init(self):
self.gif = self.config("gif", False)
@@ -280,7 +280,7 @@ class LusciousSearchExtractor(LusciousExtractor):
def __init__(self, match):
LusciousExtractor.__init__(self, match)
- self.query = match.group(1)
+ self.query = match[1]
def items(self):
query = text.parse_query(self.query)
diff --git a/gallery_dl/extractor/lynxchan.py b/gallery_dl/extractor/lynxchan.py
index 85b3fefd..d99ddd53 100644
--- a/gallery_dl/extractor/lynxchan.py
+++ b/gallery_dl/extractor/lynxchan.py
@@ -45,8 +45,8 @@ class LynxchanThreadExtractor(LynxchanExtractor):
def __init__(self, match):
LynxchanExtractor.__init__(self, match)
index = match.lastindex
- self.board = match.group(index-1)
- self.thread = match.group(index)
+ self.board = match[index-1]
+ self.thread = match[index]
def items(self):
url = "{}/{}/res/{}.json".format(self.root, self.board, self.thread)
@@ -75,7 +75,7 @@ class LynxchanBoardExtractor(LynxchanExtractor):
def __init__(self, match):
LynxchanExtractor.__init__(self, match)
- self.board = match.group(match.lastindex)
+ self.board = match[match.lastindex]
def items(self):
url = "{}/{}/catalog.json".format(self.root, self.board)
diff --git a/gallery_dl/extractor/mangadex.py b/gallery_dl/extractor/mangadex.py
index 878aab09..1a9f96ea 100644
--- a/gallery_dl/extractor/mangadex.py
+++ b/gallery_dl/extractor/mangadex.py
@@ -172,7 +172,7 @@ class MangadexListExtractor(MangadexExtractor):
"/01234567-89ab-cdef-0123-456789abcdef/NAME")
def __init__(self, match):
- if match.group(2) == "feed":
+ if match[2] == "feed":
self.subcategory = "list-feed"
else:
self.items = self._items_manga
diff --git a/gallery_dl/extractor/mangapark.py b/gallery_dl/extractor/mangapark.py
index 79edf41e..cc78ae5d 100644
--- a/gallery_dl/extractor/mangapark.py
+++ b/gallery_dl/extractor/mangapark.py
@@ -75,7 +75,7 @@ class MangaparkChapterExtractor(MangaparkBase, ChapterExtractor):
example = "https://mangapark.net/title/MANGA/12345-en-ch.01"
def __init__(self, match):
- self.root = text.root_from_url(match.group(0))
+ self.root = text.root_from_url(match[0])
ChapterExtractor.__init__(self, match, False)
def metadata(self, _):
@@ -115,8 +115,8 @@ class MangaparkMangaExtractor(MangaparkBase, Extractor):
example = "https://mangapark.net/title/12345-MANGA"
def __init__(self, match):
- self.root = text.root_from_url(match.group(0))
- self.manga_id = int(match.group(1))
+ self.root = text.root_from_url(match[0])
+ self.manga_id = int(match[1])
Extractor.__init__(self, match)
def items(self):
diff --git a/gallery_dl/extractor/mangoxo.py b/gallery_dl/extractor/mangoxo.py
index 83bddb04..1744f003 100644
--- a/gallery_dl/extractor/mangoxo.py
+++ b/gallery_dl/extractor/mangoxo.py
@@ -82,7 +82,7 @@ class MangoxoAlbumExtractor(MangoxoExtractor):
def __init__(self, match):
MangoxoExtractor.__init__(self, match)
- self.album_id = match.group(1)
+ self.album_id = match[1]
def items(self):
self.login()
@@ -147,7 +147,7 @@ class MangoxoChannelExtractor(MangoxoExtractor):
def __init__(self, match):
MangoxoExtractor.__init__(self, match)
- self.user = match.group(1)
+ self.user = match[1]
def items(self):
self.login()
diff --git a/gallery_dl/extractor/mastodon.py b/gallery_dl/extractor/mastodon.py
index 1d6a2b4c..28d8d8a3 100644
--- a/gallery_dl/extractor/mastodon.py
+++ b/gallery_dl/extractor/mastodon.py
@@ -22,7 +22,7 @@ class MastodonExtractor(BaseExtractor):
def __init__(self, match):
BaseExtractor.__init__(self, match)
- self.item = match.group(match.lastindex)
+ self.item = match[match.lastindex]
def _init(self):
self.instance = self.root.partition("://")[2]
diff --git a/gallery_dl/extractor/misskey.py b/gallery_dl/extractor/misskey.py
index 3d8475b1..70a25d76 100644
--- a/gallery_dl/extractor/misskey.py
+++ b/gallery_dl/extractor/misskey.py
@@ -20,7 +20,7 @@ class MisskeyExtractor(BaseExtractor):
def __init__(self, match):
BaseExtractor.__init__(self, match)
- self.item = match.group(match.lastindex)
+ self.item = match[match.lastindex]
def _init(self):
self.api = MisskeyAPI(self)
diff --git a/gallery_dl/extractor/moebooru.py b/gallery_dl/extractor/moebooru.py
index 6053959f..003c37f1 100644
--- a/gallery_dl/extractor/moebooru.py
+++ b/gallery_dl/extractor/moebooru.py
@@ -98,7 +98,7 @@ class MoebooruTagExtractor(MoebooruExtractor):
def __init__(self, match):
MoebooruExtractor.__init__(self, match)
- tags = match.group(match.lastindex)
+ tags = match[match.lastindex]
self.tags = text.unquote(tags.replace("+", " "))
def metadata(self):
@@ -118,7 +118,7 @@ class MoebooruPoolExtractor(MoebooruExtractor):
def __init__(self, match):
MoebooruExtractor.__init__(self, match)
- self.pool_id = match.group(match.lastindex)
+ self.pool_id = match[match.lastindex]
def metadata(self):
if self.config("metadata"):
@@ -142,7 +142,7 @@ class MoebooruPostExtractor(MoebooruExtractor):
def __init__(self, match):
MoebooruExtractor.__init__(self, match)
- self.post_id = match.group(match.lastindex)
+ self.post_id = match[match.lastindex]
def posts(self):
params = {"tags": "id:" + self.post_id}
@@ -159,8 +159,8 @@ class MoebooruPopularExtractor(MoebooruExtractor):
def __init__(self, match):
MoebooruExtractor.__init__(self, match)
- self.scale = match.group(match.lastindex-1)
- self.query = match.group(match.lastindex)
+ self.scale = match[match.lastindex-1]
+ self.query = match[match.lastindex]
def metadata(self):
self.params = params = text.parse_query(self.query)
diff --git a/gallery_dl/extractor/myhentaigallery.py b/gallery_dl/extractor/myhentaigallery.py
index f09507ce..d8c88be5 100644
--- a/gallery_dl/extractor/myhentaigallery.py
+++ b/gallery_dl/extractor/myhentaigallery.py
@@ -20,7 +20,7 @@ class MyhentaigalleryGalleryExtractor(GalleryExtractor):
example = "https://myhentaigallery.com/g/12345"
def __init__(self, match):
- self.gallery_id = match.group(1)
+ self.gallery_id = match[1]
url = "{}/g/{}".format(self.root, self.gallery_id)
GalleryExtractor.__init__(self, match, url)
diff --git a/gallery_dl/extractor/naver.py b/gallery_dl/extractor/naver.py
index 50291fc3..8c8a7d49 100644
--- a/gallery_dl/extractor/naver.py
+++ b/gallery_dl/extractor/naver.py
@@ -33,13 +33,13 @@ class NaverPostExtractor(NaverBase, GalleryExtractor):
example = "https://blog.naver.com/BLOGID/12345"
def __init__(self, match):
- blog_id = match.group(1)
+ blog_id = match[1]
if blog_id:
self.blog_id = blog_id
- self.post_id = match.group(2)
+ self.post_id = match[2]
else:
- self.blog_id = match.group(3)
- self.post_id = match.group(4)
+ self.blog_id = match[3]
+ self.post_id = match[4]
url = "{}/PostView.nhn?blogId={}&logNo={}".format(
self.root, self.blog_id, self.post_id)
@@ -134,7 +134,7 @@ class NaverBlogExtractor(NaverBase, Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.blog_id = match.group(1) or match.group(2)
+ self.blog_id = match[1] or match[2]
def items(self):
# fetch first post number
diff --git a/gallery_dl/extractor/newgrounds.py b/gallery_dl/extractor/newgrounds.py
index 4ad5ba3a..cceee491 100644
--- a/gallery_dl/extractor/newgrounds.py
+++ b/gallery_dl/extractor/newgrounds.py
@@ -30,7 +30,7 @@ class NewgroundsExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.user = match.group(1)
+ self.user = match[1]
self.user_root = "https://{}.newgrounds.com".format(self.user)
def _init(self):
@@ -397,12 +397,12 @@ class NewgroundsImageExtractor(NewgroundsExtractor):
def __init__(self, match):
NewgroundsExtractor.__init__(self, match)
- if match.group(2):
- self.user = match.group(2)
+ if match[2]:
+ self.user = match[2]
self.post_url = "https://www.newgrounds.com/art/view/{}/{}".format(
- self.user, match.group(3))
+ self.user, match[3])
else:
- self.post_url = text.ensure_http_scheme(match.group(0))
+ self.post_url = text.ensure_http_scheme(match[0])
def posts(self):
return (self.post_url,)
@@ -417,7 +417,7 @@ class NewgroundsMediaExtractor(NewgroundsExtractor):
def __init__(self, match):
NewgroundsExtractor.__init__(self, match)
self.user = ""
- self.post_url = self.root + match.group(1)
+ self.post_url = self.root + match[1]
def posts(self):
return (self.post_url,)
diff --git a/gallery_dl/extractor/nhentai.py b/gallery_dl/extractor/nhentai.py
index 0d656d04..602d96ea 100644
--- a/gallery_dl/extractor/nhentai.py
+++ b/gallery_dl/extractor/nhentai.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
@@ -22,7 +22,7 @@ class NhentaiGalleryExtractor(GalleryExtractor):
example = "https://nhentai.net/g/12345/"
def __init__(self, match):
- url = self.root + "/api/gallery/" + match.group(1)
+ url = self.root + "/api/gallery/" + match[1]
GalleryExtractor.__init__(self, match, url)
def metadata(self, page):
diff --git a/gallery_dl/extractor/nijie.py b/gallery_dl/extractor/nijie.py
index 55d30fa9..7afb6e71 100644
--- a/gallery_dl/extractor/nijie.py
+++ b/gallery_dl/extractor/nijie.py
@@ -23,7 +23,7 @@ class NijieExtractor(AsynchronousMixin, BaseExtractor):
def __init__(self, match):
BaseExtractor.__init__(self, match)
- self.user_id = text.parse_int(match.group(match.lastindex))
+ self.user_id = text.parse_int(match[match.lastindex])
def initialize(self):
self.cookies_domain = "." + self.root.rpartition("/")[2]
@@ -296,7 +296,7 @@ class NijieImageExtractor(NijieExtractor):
def __init__(self, match):
NijieExtractor.__init__(self, match)
- self.image_id = match.group(match.lastindex)
+ self.image_id = match[match.lastindex]
def image_ids(self):
return (self.image_id,)
diff --git a/gallery_dl/extractor/nitter.py b/gallery_dl/extractor/nitter.py
index cfc8861f..bce8b7b6 100644
--- a/gallery_dl/extractor/nitter.py
+++ b/gallery_dl/extractor/nitter.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2022-2023 Mike Fährmann
+# Copyright 2022-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
@@ -25,8 +25,8 @@ class NitterExtractor(BaseExtractor):
BaseExtractor.__init__(self, match)
lastindex = match.lastindex
- self.user = match.group(lastindex)
- self.user_id = match.group(lastindex + 1)
+ self.user = match[lastindex]
+ self.user_id = match[lastindex + 1]
self.user_obj = None
def items(self):
diff --git a/gallery_dl/extractor/nozomi.py b/gallery_dl/extractor/nozomi.py
index 19f0a866..5c9a0546 100644
--- a/gallery_dl/extractor/nozomi.py
+++ b/gallery_dl/extractor/nozomi.py
@@ -110,7 +110,7 @@ class NozomiPostExtractor(NozomiExtractor):
def __init__(self, match):
NozomiExtractor.__init__(self, match)
- self.post_id = match.group(1)
+ self.post_id = match[1]
def posts(self):
return (self.post_id,)
@@ -157,7 +157,7 @@ class NozomiSearchExtractor(NozomiExtractor):
def __init__(self, match):
NozomiExtractor.__init__(self, match)
- self.tags = text.unquote(match.group(1)).split()
+ self.tags = text.unquote(match[1]).split()
def metadata(self):
return {"search_tags": self.tags}
diff --git a/gallery_dl/extractor/nsfwalbum.py b/gallery_dl/extractor/nsfwalbum.py
index 608d64c6..d824e48c 100644
--- a/gallery_dl/extractor/nsfwalbum.py
+++ b/gallery_dl/extractor/nsfwalbum.py
@@ -25,7 +25,7 @@ class NsfwalbumAlbumExtractor(GalleryExtractor):
example = "https://nsfwalbum.com/album/12345"
def __init__(self, match):
- self.album_id = match.group(2)
+ self.album_id = match[2]
GalleryExtractor.__init__(self, match)
def metadata(self, page):
diff --git a/gallery_dl/extractor/oauth.py b/gallery_dl/extractor/oauth.py
index 1f0e241b..ecc10b37 100644
--- a/gallery_dl/extractor/oauth.py
+++ b/gallery_dl/extractor/oauth.py
@@ -354,7 +354,7 @@ class OAuthMastodon(OAuthBase):
def __init__(self, match):
OAuthBase.__init__(self, match)
- self.instance = match.group(1)
+ self.instance = match[1]
def items(self):
yield Message.Version, 1
diff --git a/gallery_dl/extractor/philomena.py b/gallery_dl/extractor/philomena.py
index 80641ad1..a34459fe 100644
--- a/gallery_dl/extractor/philomena.py
+++ b/gallery_dl/extractor/philomena.py
@@ -67,7 +67,7 @@ class PhilomenaPostExtractor(PhilomenaExtractor):
def __init__(self, match):
PhilomenaExtractor.__init__(self, match)
- self.image_id = match.group(match.lastindex)
+ self.image_id = match[match.lastindex]
def posts(self):
return (self.api.image(self.image_id),)
@@ -116,7 +116,7 @@ class PhilomenaGalleryExtractor(PhilomenaExtractor):
def __init__(self, match):
PhilomenaExtractor.__init__(self, match)
- self.gallery_id = match.group(match.lastindex)
+ self.gallery_id = match[match.lastindex]
def metadata(self):
try:
diff --git a/gallery_dl/extractor/photovogue.py b/gallery_dl/extractor/photovogue.py
index 2a2df5a6..bc6c43ae 100644
--- a/gallery_dl/extractor/photovogue.py
+++ b/gallery_dl/extractor/photovogue.py
@@ -23,7 +23,7 @@ class PhotovogueUserExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.user_id = match.group(1)
+ self.user_id = match[1]
def items(self):
for photo in self.photos():
diff --git a/gallery_dl/extractor/picarto.py b/gallery_dl/extractor/picarto.py
index cc7eee5f..ba3ae627 100644
--- a/gallery_dl/extractor/picarto.py
+++ b/gallery_dl/extractor/picarto.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2021-2023 Mike Fährmann
+# Copyright 2021-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
@@ -25,7 +25,7 @@ class PicartoGalleryExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.username = match.group(1)
+ self.username = match[1]
def items(self):
for post in self.posts():
diff --git a/gallery_dl/extractor/pillowfort.py b/gallery_dl/extractor/pillowfort.py
index 32919ff7..37b414d2 100644
--- a/gallery_dl/extractor/pillowfort.py
+++ b/gallery_dl/extractor/pillowfort.py
@@ -27,7 +27,7 @@ class PillowfortExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.item = match.group(1)
+ self.item = match[1]
def items(self):
self.login()
diff --git a/gallery_dl/extractor/pinterest.py b/gallery_dl/extractor/pinterest.py
index 2df9ebf9..8531b6eb 100644
--- a/gallery_dl/extractor/pinterest.py
+++ b/gallery_dl/extractor/pinterest.py
@@ -214,7 +214,7 @@ class PinterestPinExtractor(PinterestExtractor):
def __init__(self, match):
PinterestExtractor.__init__(self, match)
- self.pin_id = match.group(1)
+ self.pin_id = match[1]
self.pin = None
def metadata(self):
@@ -236,8 +236,8 @@ class PinterestBoardExtractor(PinterestExtractor):
def __init__(self, match):
PinterestExtractor.__init__(self, match)
- self.user = text.unquote(match.group(1))
- self.board_name = text.unquote(match.group(2))
+ self.user = text.unquote(match[1])
+ self.board_name = text.unquote(match[2])
self.board = None
def metadata(self):
@@ -266,7 +266,7 @@ class PinterestUserExtractor(PinterestExtractor):
def __init__(self, match):
PinterestExtractor.__init__(self, match)
- self.user = text.unquote(match.group(1))
+ self.user = text.unquote(match[1])
def items(self):
for board in self.api.boards(self.user):
@@ -285,7 +285,7 @@ class PinterestAllpinsExtractor(PinterestExtractor):
def __init__(self, match):
PinterestExtractor.__init__(self, match)
- self.user = text.unquote(match.group(1))
+ self.user = text.unquote(match[1])
def metadata(self):
return {"user": self.user}
@@ -303,7 +303,7 @@ class PinterestCreatedExtractor(PinterestExtractor):
def __init__(self, match):
PinterestExtractor.__init__(self, match)
- self.user = text.unquote(match.group(1))
+ self.user = text.unquote(match[1])
def metadata(self):
return {"user": self.user}
@@ -323,9 +323,9 @@ class PinterestSectionExtractor(PinterestExtractor):
def __init__(self, match):
PinterestExtractor.__init__(self, match)
- self.user = text.unquote(match.group(1))
- self.board_slug = text.unquote(match.group(2))
- self.section_slug = text.unquote(match.group(3))
+ self.user = text.unquote(match[1])
+ self.board_slug = text.unquote(match[2])
+ self.section_slug = text.unquote(match[3])
self.section = None
def metadata(self):
@@ -351,7 +351,7 @@ class PinterestSearchExtractor(PinterestExtractor):
def __init__(self, match):
PinterestExtractor.__init__(self, match)
- self.search = text.unquote(match.group(1))
+ self.search = text.unquote(match[1])
def metadata(self):
return {"search": self.search}
diff --git a/gallery_dl/extractor/pixeldrain.py b/gallery_dl/extractor/pixeldrain.py
index 262bd18c..a3426e6a 100644
--- a/gallery_dl/extractor/pixeldrain.py
+++ b/gallery_dl/extractor/pixeldrain.py
@@ -39,7 +39,7 @@ class PixeldrainFileExtractor(PixeldrainExtractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.file_id = match.group(1)
+ self.file_id = match[1]
def items(self):
url = "{}/api/file/{}".format(self.root, self.file_id)
@@ -64,8 +64,8 @@ class PixeldrainAlbumExtractor(PixeldrainExtractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.album_id = match.group(1)
- self.file_index = match.group(2)
+ self.album_id = match[1]
+ self.file_index = match[2]
def items(self):
url = "{}/api/list/{}".format(self.root, self.album_id)
diff --git a/gallery_dl/extractor/pixiv.py b/gallery_dl/extractor/pixiv.py
index 4cc32243..d1ca0b2a 100644
--- a/gallery_dl/extractor/pixiv.py
+++ b/gallery_dl/extractor/pixiv.py
@@ -320,7 +320,7 @@ class PixivExtractor(Extractor):
if not caption:
return ""
return text.unescape(self.meta_captions_sub(
- lambda m: '')
match = self._search_canonical_url(post_canonical_url)
- forum = match.group(1)
- id = int(match.group(2))
+ forum = match[1]
+ id = int(match[2])
is_text_post = (url[0] == "/")
is_image_post = self._search_image_tag(page) is not None
@@ -142,8 +142,8 @@ class PostmillPostExtractor(PostmillExtractor):
def __init__(self, match):
PostmillExtractor.__init__(self, match)
- self.forum = match.group(3)
- self.post_id = match.group(4)
+ self.forum = match[3]
+ self.post_id = match[4]
def post_urls(self):
return (self.root + "/f/" + self.forum + "/" + self.post_id,)
diff --git a/gallery_dl/extractor/rawkuma.py b/gallery_dl/extractor/rawkuma.py
index 0196a2f1..bc3f042e 100644
--- a/gallery_dl/extractor/rawkuma.py
+++ b/gallery_dl/extractor/rawkuma.py
@@ -25,7 +25,7 @@ class RawkumaChapterExtractor(RawkumaBase, ChapterExtractor):
example = "https://rawkuma.net/TITLE-chapter-123/"
def __init__(self, match):
- url = "{}/{}/".format(self.root, match.group(1))
+ url = "{}/{}/".format(self.root, match[1])
ChapterExtractor.__init__(self, match, url)
def metadata(self, page):
@@ -61,7 +61,7 @@ class RawkumaMangaExtractor(RawkumaBase, MangaExtractor):
example = "https://rawkuma.net/manga/TITLE/"
def __init__(self, match):
- url = "{}/manga/{}/".format(self.root, match.group(1))
+ url = "{}/manga/{}/".format(self.root, match[1])
MangaExtractor.__init__(self, match, url)
def chapters(self, page):
diff --git a/gallery_dl/extractor/reactor.py b/gallery_dl/extractor/reactor.py
index ab555d8d..133d60c8 100644
--- a/gallery_dl/extractor/reactor.py
+++ b/gallery_dl/extractor/reactor.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2019-2023 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
@@ -23,7 +23,7 @@ class ReactorExtractor(BaseExtractor):
def __init__(self, match):
BaseExtractor.__init__(self, match)
- url = text.ensure_http_scheme(match.group(0), "http://")
+ url = text.ensure_http_scheme(match[0], "http://")
pos = url.index("/", 10)
self.root = url[:pos]
self.path = url[pos:]
@@ -176,7 +176,7 @@ class ReactorTagExtractor(ReactorExtractor):
def __init__(self, match):
ReactorExtractor.__init__(self, match)
- self.tag = match.group(match.lastindex)
+ self.tag = match[match.lastindex]
def metadata(self):
return {"search_tags": text.unescape(self.tag).replace("+", " ")}
@@ -192,7 +192,7 @@ class ReactorSearchExtractor(ReactorExtractor):
def __init__(self, match):
ReactorExtractor.__init__(self, match)
- self.tag = match.group(match.lastindex)
+ self.tag = match[match.lastindex]
def metadata(self):
return {"search_tags": text.unescape(self.tag).replace("+", " ")}
@@ -207,7 +207,7 @@ class ReactorUserExtractor(ReactorExtractor):
def __init__(self, match):
ReactorExtractor.__init__(self, match)
- self.user = match.group(match.lastindex)
+ self.user = match[match.lastindex]
def metadata(self):
return {"user": text.unescape(self.user).replace("+", " ")}
@@ -221,7 +221,7 @@ class ReactorPostExtractor(ReactorExtractor):
def __init__(self, match):
ReactorExtractor.__init__(self, match)
- self.post_id = match.group(match.lastindex)
+ self.post_id = match[match.lastindex]
def items(self):
post = self.request(self.root + self.path).text
diff --git a/gallery_dl/extractor/readcomiconline.py b/gallery_dl/extractor/readcomiconline.py
index 6c8f8040..b7c152af 100644
--- a/gallery_dl/extractor/readcomiconline.py
+++ b/gallery_dl/extractor/readcomiconline.py
@@ -50,7 +50,7 @@ class ReadcomiconlineIssueExtractor(ReadcomiconlineBase, ChapterExtractor):
def __init__(self, match):
ChapterExtractor.__init__(self, match)
- self.params = match.group(2)
+ self.params = match[2]
def _init(self):
params = text.parse_query(self.params)
@@ -71,7 +71,7 @@ class ReadcomiconlineIssueExtractor(ReadcomiconlineBase, ChapterExtractor):
match = re.match(r"(?:Issue )?#(\d+)|(.+)", iinfo)
return {
"comic": comic,
- "issue": match.group(1) or match.group(2),
+ "issue": match[1] or match[2],
"issue_id": text.parse_int(self.issue_id),
"lang": "en",
"language": "English",
diff --git a/gallery_dl/extractor/recursive.py b/gallery_dl/extractor/recursive.py
index e8f24256..4762fa57 100644
--- a/gallery_dl/extractor/recursive.py
+++ b/gallery_dl/extractor/recursive.py
@@ -28,4 +28,4 @@ class RecursiveExtractor(Extractor):
page = self.request(text.ensure_http_scheme(url)).text
for match in util.re(r"https?://[^\s\"']+").finditer(page):
- yield Message.Queue, match.group(0), {}
+ yield Message.Queue, match[0], {}
diff --git a/gallery_dl/extractor/reddit.py b/gallery_dl/extractor/reddit.py
index 6e2dc614..76785601 100644
--- a/gallery_dl/extractor/reddit.py
+++ b/gallery_dl/extractor/reddit.py
@@ -141,7 +141,7 @@ class RedditExtractor(Extractor):
match = match_submission(url)
if match:
- extra.append(match.group(1))
+ extra.append(match[1])
elif not match_user(url) and not match_subreddit(url):
if previews and "comment" not in data and \
"preview" in data:
@@ -309,7 +309,7 @@ class RedditSubmissionExtractor(RedditExtractor):
def __init__(self, match):
RedditExtractor.__init__(self, match)
- self.submission_id = match.group(1)
+ self.submission_id = match[1]
def submissions(self):
return (self.api.submission(self.submission_id),)
@@ -326,14 +326,14 @@ class RedditImageExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- domain = match.group(1)
- self.path = match.group(2)
+ domain = match[1]
+ self.path = match[2]
if domain == "preview.redd.it":
self.domain = "i.redd.it"
self.query = ""
else:
self.domain = domain
- self.query = match.group(3) or ""
+ self.query = match[3] or ""
def items(self):
url = "https://{}/{}{}".format(self.domain, self.path, self.query)
diff --git a/gallery_dl/extractor/redgifs.py b/gallery_dl/extractor/redgifs.py
index f1758a5f..480485c8 100644
--- a/gallery_dl/extractor/redgifs.py
+++ b/gallery_dl/extractor/redgifs.py
@@ -23,7 +23,7 @@ class RedgifsExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.key = match.group(1)
+ self.key = match[1]
def _init(self):
self.api = RedgifsAPI(self)
@@ -94,7 +94,7 @@ class RedgifsUserExtractor(RedgifsExtractor):
def __init__(self, match):
RedgifsExtractor.__init__(self, match)
- self.query = match.group(2)
+ self.query = match[2]
def metadata(self):
return {"userName": self.key}
@@ -116,7 +116,7 @@ class RedgifsCollectionExtractor(RedgifsExtractor):
def __init__(self, match):
RedgifsExtractor.__init__(self, match)
- self.collection_id = match.group(2)
+ self.collection_id = match[2]
def metadata(self):
collection = self.api.collection_info(self.key, self.collection_id)
@@ -151,7 +151,7 @@ class RedgifsNichesExtractor(RedgifsExtractor):
def __init__(self, match):
RedgifsExtractor.__init__(self, match)
- self.query = match.group(2)
+ self.query = match[2]
def gifs(self):
order = text.parse_query(self.query).get("order")
diff --git a/gallery_dl/extractor/rule34us.py b/gallery_dl/extractor/rule34us.py
index ca68ff21..27cf6b05 100644
--- a/gallery_dl/extractor/rule34us.py
+++ b/gallery_dl/extractor/rule34us.py
@@ -61,7 +61,7 @@ class Rule34usTagExtractor(Rule34usExtractor):
def __init__(self, match):
Rule34usExtractor.__init__(self, match)
- self.tags = text.unquote(match.group(1).replace("+", " "))
+ self.tags = text.unquote(match[1].replace("+", " "))
def metadata(self):
return {"search_tags": self.tags}
@@ -98,7 +98,7 @@ class Rule34usPostExtractor(Rule34usExtractor):
def __init__(self, match):
Rule34usExtractor.__init__(self, match)
- self.post_id = match.group(1)
+ self.post_id = match[1]
def posts(self):
return (self._parse_post(self.post_id),)
diff --git a/gallery_dl/extractor/sankaku.py b/gallery_dl/extractor/sankaku.py
index 167dee04..4d2772cc 100644
--- a/gallery_dl/extractor/sankaku.py
+++ b/gallery_dl/extractor/sankaku.py
@@ -124,7 +124,7 @@ class SankakuTagExtractor(SankakuExtractor):
def __init__(self, match):
SankakuExtractor.__init__(self, match)
- query = text.parse_query(match.group(1))
+ query = text.parse_query(match[1])
self.tags = text.unquote(query.get("tags", "").replace("+", " "))
if "date:" in self.tags:
@@ -154,7 +154,7 @@ class SankakuPoolExtractor(SankakuExtractor):
def __init__(self, match):
SankakuExtractor.__init__(self, match)
- self.pool_id = match.group(1)
+ self.pool_id = match[1]
def metadata(self):
pool = self.api.pools(self.pool_id)
@@ -180,7 +180,7 @@ class SankakuPostExtractor(SankakuExtractor):
def __init__(self, match):
SankakuExtractor.__init__(self, match)
- self.post_id = match.group(1)
+ self.post_id = match[1]
def posts(self):
return self.api.posts(self.post_id)
@@ -194,7 +194,7 @@ class SankakuBooksExtractor(SankakuExtractor):
def __init__(self, match):
SankakuExtractor.__init__(self, match)
- query = text.parse_query(match.group(1))
+ query = text.parse_query(match[1])
self.tags = text.unquote(query.get("tags", "").replace("+", " "))
def items(self):
diff --git a/gallery_dl/extractor/sankakucomplex.py b/gallery_dl/extractor/sankakucomplex.py
index 470b0ba2..a3177d5d 100644
--- a/gallery_dl/extractor/sankakucomplex.py
+++ b/gallery_dl/extractor/sankakucomplex.py
@@ -19,7 +19,7 @@ class SankakucomplexExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.path = match.group(1)
+ self.path = match[1]
class SankakucomplexArticleExtractor(SankakucomplexExtractor):
diff --git a/gallery_dl/extractor/seiga.py b/gallery_dl/extractor/seiga.py
index 87d57259..350e4d6c 100644
--- a/gallery_dl/extractor/seiga.py
+++ b/gallery_dl/extractor/seiga.py
@@ -187,7 +187,7 @@ class SeigaImageExtractor(SeigaExtractor):
def __init__(self, match):
SeigaExtractor.__init__(self, match)
- self.image_id = match.group(1)
+ self.image_id = match[1]
def skip(self, num):
self.start_image += num
diff --git a/gallery_dl/extractor/shopify.py b/gallery_dl/extractor/shopify.py
index a658cac4..8f2e6e4b 100644
--- a/gallery_dl/extractor/shopify.py
+++ b/gallery_dl/extractor/shopify.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2019-2023 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
@@ -20,7 +20,7 @@ class ShopifyExtractor(BaseExtractor):
def __init__(self, match):
BaseExtractor.__init__(self, match)
- self.item_url = self.root + match.group(match.lastindex)
+ self.item_url = self.root + match[match.lastindex]
def items(self):
data = self.metadata()
diff --git a/gallery_dl/extractor/simplyhentai.py b/gallery_dl/extractor/simplyhentai.py
index 6f722916..3ffd8479 100644
--- a/gallery_dl/extractor/simplyhentai.py
+++ b/gallery_dl/extractor/simplyhentai.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2018-2023 Mike Fährmann
+# Copyright 2018-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
@@ -80,8 +80,8 @@ class SimplyhentaiImageExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.page_url = "https://old." + match.group(1)
- self.type = match.group(2)
+ self.page_url = "https://old." + match[1]
+ self.type = match[2]
def items(self):
extr = text.extract_from(self.request(self.page_url).text)
@@ -123,7 +123,7 @@ class SimplyhentaiVideoExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.page_url = "https://" + match.group(1)
+ self.page_url = "https://" + match[1]
def items(self):
page = self.request(self.page_url).text
diff --git a/gallery_dl/extractor/skeb.py b/gallery_dl/extractor/skeb.py
index cdccd4c5..d541bb5d 100644
--- a/gallery_dl/extractor/skeb.py
+++ b/gallery_dl/extractor/skeb.py
@@ -21,7 +21,7 @@ class SkebExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.user_name = match.group(1)
+ self.user_name = match[1]
def _init(self):
self.thumbnails = self.config("thumbnails", False)
@@ -203,7 +203,7 @@ class SkebPostExtractor(SkebExtractor):
def __init__(self, match):
SkebExtractor.__init__(self, match)
- self.post_num = match.group(2)
+ self.post_num = match[2]
def posts(self):
return ((self.user_name, self.post_num),)
diff --git a/gallery_dl/extractor/slickpic.py b/gallery_dl/extractor/slickpic.py
index b2961e17..64f8a02d 100644
--- a/gallery_dl/extractor/slickpic.py
+++ b/gallery_dl/extractor/slickpic.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2019-2023 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
@@ -21,7 +21,7 @@ class SlickpicExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.user = match.group(1)
+ self.user = match[1]
self.root = "https://{}.slickpic.com".format(self.user)
@@ -37,7 +37,7 @@ class SlickpicAlbumExtractor(SlickpicExtractor):
def __init__(self, match):
SlickpicExtractor.__init__(self, match)
- self.album = match.group(2)
+ self.album = match[2]
def items(self):
data = self.metadata()
diff --git a/gallery_dl/extractor/smugmug.py b/gallery_dl/extractor/smugmug.py
index 41882d29..d250279e 100644
--- a/gallery_dl/extractor/smugmug.py
+++ b/gallery_dl/extractor/smugmug.py
@@ -71,7 +71,7 @@ class SmugmugAlbumExtractor(SmugmugExtractor):
def __init__(self, match):
SmugmugExtractor.__init__(self, match)
- self.album_id = match.group(1)
+ self.album_id = match[1]
def items(self):
album = self.api.album(self.album_id, "User")
@@ -98,7 +98,7 @@ class SmugmugImageExtractor(SmugmugExtractor):
def __init__(self, match):
SmugmugExtractor.__init__(self, match)
- self.image_id = match.group(3)
+ self.image_id = match[3]
def items(self):
image = self.api.image(self.image_id, "ImageSizeDetails")
diff --git a/gallery_dl/extractor/soundgasm.py b/gallery_dl/extractor/soundgasm.py
index 7c75aaae..4632b2ab 100644
--- a/gallery_dl/extractor/soundgasm.py
+++ b/gallery_dl/extractor/soundgasm.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2022-2023 Mike Fährmann
+# Copyright 2022-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
@@ -69,7 +69,7 @@ class SoundgasmUserExtractor(SoundgasmExtractor):
def __init__(self, match):
SoundgasmExtractor.__init__(self, match)
- self.user = match.group(1)
+ self.user = match[1]
def sounds(self):
page = self.request(self.root + "/user/" + self.user).text
diff --git a/gallery_dl/extractor/steamgriddb.py b/gallery_dl/extractor/steamgriddb.py
index c120ee55..ac7b6a51 100644
--- a/gallery_dl/extractor/steamgriddb.py
+++ b/gallery_dl/extractor/steamgriddb.py
@@ -83,11 +83,11 @@ class SteamgriddbAssetsExtractor(SteamgriddbExtractor):
def __init__(self, match):
SteamgriddbExtractor.__init__(self, match)
- list_type = match.group(1)
- id = int(match.group(2))
+ list_type = match[1]
+ id = int(match[2])
self.game_id = id if list_type == "game" else None
self.collection_id = id if list_type == "collection" else None
- self.page = int(match.group(3) or 1)
+ self.page = int(match[3] or 1)
def assets(self):
limit = 48
@@ -162,8 +162,8 @@ class SteamgriddbAssetExtractor(SteamgriddbExtractor):
def __init__(self, match):
SteamgriddbExtractor.__init__(self, match)
- self.asset_type = match.group(1)
- self.asset_id = match.group(2)
+ self.asset_type = match[1]
+ self.asset_id = match[2]
def assets(self):
endpoint = "/api/public/asset/" + self.asset_type + "/" + self.asset_id
diff --git a/gallery_dl/extractor/tcbscans.py b/gallery_dl/extractor/tcbscans.py
index 71431ada..6dcb153c 100644
--- a/gallery_dl/extractor/tcbscans.py
+++ b/gallery_dl/extractor/tcbscans.py
@@ -19,7 +19,7 @@ class TcbscansChapterExtractor(ChapterExtractor):
example = "https://tcbscans.me/chapters/12345/MANGA-chapter-123"
def __init__(self, match):
- self.root = text.root_from_url(match.group(0))
+ self.root = text.root_from_url(match[0])
ChapterExtractor.__init__(self, match)
def images(self, page):
@@ -48,7 +48,7 @@ class TcbscansMangaExtractor(MangaExtractor):
example = "https://tcbscans.me/mangas/123/MANGA"
def __init__(self, match):
- self.root = text.root_from_url(match.group(0))
+ self.root = text.root_from_url(match[0])
MangaExtractor.__init__(self, match)
def chapters(self, page):
diff --git a/gallery_dl/extractor/tmohentai.py b/gallery_dl/extractor/tmohentai.py
index 9c297279..ecdc194e 100644
--- a/gallery_dl/extractor/tmohentai.py
+++ b/gallery_dl/extractor/tmohentai.py
@@ -20,7 +20,7 @@ class TmohentaiGalleryExtractor(GalleryExtractor):
example = "https://tmohentai.com/contents/12345a67b89c0"
def __init__(self, match):
- self.gallery_id = match.group(1)
+ self.gallery_id = match[1]
url = "{}/contents/{}".format(self.root, self.gallery_id)
GalleryExtractor.__init__(self, match, url)
diff --git a/gallery_dl/extractor/toyhouse.py b/gallery_dl/extractor/toyhouse.py
index e85fff58..0b156719 100644
--- a/gallery_dl/extractor/toyhouse.py
+++ b/gallery_dl/extractor/toyhouse.py
@@ -23,7 +23,7 @@ class ToyhouseExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.user = match.group(1)
+ self.user = match[1]
self.offset = 0
def items(self):
diff --git a/gallery_dl/extractor/tsumino.py b/gallery_dl/extractor/tsumino.py
index 97cfa99d..d3c1d09a 100644
--- a/gallery_dl/extractor/tsumino.py
+++ b/gallery_dl/extractor/tsumino.py
@@ -47,7 +47,7 @@ class TsuminoGalleryExtractor(TsuminoBase, GalleryExtractor):
example = "https://www.tsumino.com/entry/12345"
def __init__(self, match):
- self.gallery_id = match.group(1)
+ self.gallery_id = match[1]
url = "{}/entry/{}".format(self.root, self.gallery_id)
GalleryExtractor.__init__(self, match, url)
@@ -109,7 +109,7 @@ class TsuminoSearchExtractor(TsuminoBase, Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.query = match.group(1)
+ self.query = match[1]
def items(self):
for gallery in self.galleries():
diff --git a/gallery_dl/extractor/tumblr.py b/gallery_dl/extractor/tumblr.py
index 16fd22a4..7a4f3513 100644
--- a/gallery_dl/extractor/tumblr.py
+++ b/gallery_dl/extractor/tumblr.py
@@ -34,11 +34,11 @@ class TumblrExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- name = match.group(2)
+ name = match[2]
if name:
self.blog = name + ".tumblr.com"
else:
- self.blog = match.group(1) or match.group(3)
+ self.blog = match[1] or match[3]
def _init(self):
self.api = TumblrAPI(self)
@@ -288,7 +288,7 @@ class TumblrPostExtractor(TumblrExtractor):
def __init__(self, match):
TumblrExtractor.__init__(self, match)
- self.post_id = match.group(4)
+ self.post_id = match[4]
self.reblogs = True
self.date_min = 0
@@ -307,7 +307,7 @@ class TumblrTagExtractor(TumblrExtractor):
def __init__(self, match):
TumblrExtractor.__init__(self, match)
- self.tag = text.unquote(match.group(4).replace("-", " "))
+ self.tag = text.unquote(match[4].replace("-", " "))
def posts(self):
return self.api.posts(self.blog, {"tag": self.tag})
@@ -321,7 +321,7 @@ class TumblrDayExtractor(TumblrExtractor):
def __init__(self, match):
TumblrExtractor.__init__(self, match)
- year, month, day = match.group(4).split("/")
+ year, month, day = match[4].split("/")
self.ordinal = date(int(year), int(month), int(day)).toordinal()
def _init(self):
diff --git a/gallery_dl/extractor/tumblrgallery.py b/gallery_dl/extractor/tumblrgallery.py
index 8a4c756d..1f99b8c8 100644
--- a/gallery_dl/extractor/tumblrgallery.py
+++ b/gallery_dl/extractor/tumblrgallery.py
@@ -41,7 +41,7 @@ class TumblrgalleryTumblrblogExtractor(TumblrgalleryExtractor):
def __init__(self, match):
TumblrgalleryExtractor.__init__(self, match)
- self.gallery_id = text.parse_int(match.group(2))
+ self.gallery_id = text.parse_int(match[2])
def metadata(self, page):
return {
@@ -72,7 +72,7 @@ class TumblrgalleryPostExtractor(TumblrgalleryExtractor):
def __init__(self, match):
TumblrgalleryExtractor.__init__(self, match)
- self.gallery_id = text.parse_int(match.group(2))
+ self.gallery_id = text.parse_int(match[2])
def metadata(self, page):
return {
@@ -97,7 +97,7 @@ class TumblrgallerySearchExtractor(TumblrgalleryExtractor):
def __init__(self, match):
TumblrgalleryExtractor.__init__(self, match)
- self.search_term = match.group(2)
+ self.search_term = match[2]
def metadata(self, page):
return {
diff --git a/gallery_dl/extractor/twibooru.py b/gallery_dl/extractor/twibooru.py
index 5c2835bc..38d8bee8 100644
--- a/gallery_dl/extractor/twibooru.py
+++ b/gallery_dl/extractor/twibooru.py
@@ -54,7 +54,7 @@ class TwibooruPostExtractor(TwibooruExtractor):
def __init__(self, match):
TwibooruExtractor.__init__(self, match)
- self.post_id = match.group(1)
+ self.post_id = match[1]
def posts(self):
return (self.api.post(self.post_id),)
@@ -103,7 +103,7 @@ class TwibooruGalleryExtractor(TwibooruExtractor):
def __init__(self, match):
TwibooruExtractor.__init__(self, match)
- self.gallery_id = match.group(1)
+ self.gallery_id = match[1]
def metadata(self):
return {"gallery": self.api.gallery(self.gallery_id)}
diff --git a/gallery_dl/extractor/twitter.py b/gallery_dl/extractor/twitter.py
index dde16830..8e9e1759 100644
--- a/gallery_dl/extractor/twitter.py
+++ b/gallery_dl/extractor/twitter.py
@@ -31,7 +31,7 @@ class TwitterExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.user = match.group(1)
+ self.user = match[1]
def _init(self):
self.unavailable = self.config("unavailable", False)
@@ -896,7 +896,7 @@ class TwitterTweetExtractor(TwitterExtractor):
def __init__(self, match):
TwitterExtractor.__init__(self, match)
- self.tweet_id = match.group(2)
+ self.tweet_id = match[2]
def tweets(self):
conversations = self.config("conversations")
diff --git a/gallery_dl/extractor/unsplash.py b/gallery_dl/extractor/unsplash.py
index 40137e94..16706c91 100644
--- a/gallery_dl/extractor/unsplash.py
+++ b/gallery_dl/extractor/unsplash.py
@@ -26,7 +26,7 @@ class UnsplashExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.item = match.group(1)
+ self.item = match[1]
def items(self):
fmt = self.config("format") or "raw"
@@ -114,7 +114,7 @@ class UnsplashCollectionExtractor(UnsplashExtractor):
def __init__(self, match):
UnsplashExtractor.__init__(self, match)
- self.title = match.group(2) or ""
+ self.title = match[2] or ""
def metadata(self):
return {"collection_id": self.item, "collection_title": self.title}
@@ -133,7 +133,7 @@ class UnsplashSearchExtractor(UnsplashExtractor):
def __init__(self, match):
UnsplashExtractor.__init__(self, match)
- self.query = match.group(2)
+ self.query = match[2]
def photos(self):
url = self.root + "/napi/search/photos"
diff --git a/gallery_dl/extractor/uploadir.py b/gallery_dl/extractor/uploadir.py
index ce34e7de..b6e482b2 100644
--- a/gallery_dl/extractor/uploadir.py
+++ b/gallery_dl/extractor/uploadir.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2022-2023 Mike Fährmann
+# Copyright 2022-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
@@ -24,7 +24,7 @@ class UploadirFileExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.file_id = match.group(1)
+ self.file_id = match[1]
def items(self):
url = "{}/u/{}".format(self.root, self.file_id)
diff --git a/gallery_dl/extractor/vanillarock.py b/gallery_dl/extractor/vanillarock.py
index 1ce969f7..e0107f36 100644
--- a/gallery_dl/extractor/vanillarock.py
+++ b/gallery_dl/extractor/vanillarock.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2019-2023 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
@@ -19,7 +19,7 @@ class VanillarockExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.path = match.group(1)
+ self.path = match[1]
class VanillarockPostExtractor(VanillarockExtractor):
diff --git a/gallery_dl/extractor/vichan.py b/gallery_dl/extractor/vichan.py
index 3b24d50f..42aed2b5 100644
--- a/gallery_dl/extractor/vichan.py
+++ b/gallery_dl/extractor/vichan.py
@@ -41,8 +41,8 @@ class VichanThreadExtractor(VichanExtractor):
def __init__(self, match):
VichanExtractor.__init__(self, match)
index = match.lastindex
- self.board = match.group(index-1)
- self.thread = match.group(index)
+ self.board = match[index-1]
+ self.thread = match[index]
def items(self):
url = "{}/{}/res/{}.json".format(self.root, self.board, self.thread)
@@ -96,7 +96,7 @@ class VichanBoardExtractor(VichanExtractor):
def __init__(self, match):
VichanExtractor.__init__(self, match)
- self.board = match.group(match.lastindex)
+ self.board = match[match.lastindex]
def items(self):
url = "{}/{}/threads.json".format(self.root, self.board)
diff --git a/gallery_dl/extractor/vk.py b/gallery_dl/extractor/vk.py
index cd46be85..3218bd05 100644
--- a/gallery_dl/extractor/vk.py
+++ b/gallery_dl/extractor/vk.py
@@ -204,7 +204,7 @@ class VkTaggedExtractor(VkExtractor):
def __init__(self, match):
VkExtractor.__init__(self, match)
- self.user_id = match.group(1)
+ self.user_id = match[1]
def photos(self):
return self._pagination("tag{}".format(self.user_id))
diff --git a/gallery_dl/extractor/vsco.py b/gallery_dl/extractor/vsco.py
index cbc27cad..0496be06 100644
--- a/gallery_dl/extractor/vsco.py
+++ b/gallery_dl/extractor/vsco.py
@@ -25,7 +25,7 @@ class VscoExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.user = match.group(1).lower()
+ self.user = match[1].lower()
def items(self):
videos = self.config("videos", True)
diff --git a/gallery_dl/extractor/wallhaven.py b/gallery_dl/extractor/wallhaven.py
index e86cbdb3..5272b53e 100644
--- a/gallery_dl/extractor/wallhaven.py
+++ b/gallery_dl/extractor/wallhaven.py
@@ -60,7 +60,7 @@ class WallhavenSearchExtractor(WallhavenExtractor):
def __init__(self, match):
WallhavenExtractor.__init__(self, match)
- self.params = text.parse_query(match.group(1))
+ self.params = text.parse_query(match[1])
def wallpapers(self):
return self.api.search(self.params)
@@ -108,7 +108,7 @@ class WallhavenCollectionsExtractor(WallhavenExtractor):
def __init__(self, match):
WallhavenExtractor.__init__(self, match)
- self.username = match.group(1)
+ self.username = match[1]
def items(self):
for collection in self.api.collections(self.username):
@@ -128,7 +128,7 @@ class WallhavenUploadsExtractor(WallhavenExtractor):
def __init__(self, match):
WallhavenExtractor.__init__(self, match)
- self.username = match.group(1)
+ self.username = match[1]
def wallpapers(self):
params = {"q": "@" + self.username}
@@ -147,7 +147,7 @@ class WallhavenImageExtractor(WallhavenExtractor):
def __init__(self, match):
WallhavenExtractor.__init__(self, match)
- self.wallpaper_id = match.group(1)
+ self.wallpaper_id = match[1]
def wallpapers(self):
return (self.api.info(self.wallpaper_id),)
diff --git a/gallery_dl/extractor/weasyl.py b/gallery_dl/extractor/weasyl.py
index 6a0e0661..0a2a835f 100644
--- a/gallery_dl/extractor/weasyl.py
+++ b/gallery_dl/extractor/weasyl.py
@@ -76,7 +76,7 @@ class WeasylSubmissionExtractor(WeasylExtractor):
def __init__(self, match):
WeasylExtractor.__init__(self, match)
- self.submitid = match.group(1)
+ self.submitid = match[1]
def items(self):
data = self.request_submission(self.submitid)
@@ -92,7 +92,7 @@ class WeasylSubmissionsExtractor(WeasylExtractor):
def __init__(self, match):
WeasylExtractor.__init__(self, match)
- self.owner_login = match.group(1)
+ self.owner_login = match[1]
def items(self):
yield Message.Directory, {"owner_login": self.owner_login}
@@ -128,7 +128,7 @@ class WeasylJournalExtractor(WeasylExtractor):
def __init__(self, match):
WeasylExtractor.__init__(self, match)
- self.journalid = match.group(1)
+ self.journalid = match[1]
def items(self):
data = self.retrieve_journal(self.journalid)
@@ -145,7 +145,7 @@ class WeasylJournalsExtractor(WeasylExtractor):
def __init__(self, match):
WeasylExtractor.__init__(self, match)
- self.owner_login = match.group(1)
+ self.owner_login = match[1]
def items(self):
yield Message.Directory, {"owner_login": self.owner_login}
diff --git a/gallery_dl/extractor/webmshare.py b/gallery_dl/extractor/webmshare.py
index 7e2b5ea3..5ec6fc13 100644
--- a/gallery_dl/extractor/webmshare.py
+++ b/gallery_dl/extractor/webmshare.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2022-2023 Mike Fährmann
+# Copyright 2022-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
@@ -25,7 +25,7 @@ class WebmshareVideoExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.video_id = match.group(1)
+ self.video_id = match[1]
def items(self):
url = "{}/{}".format(self.root, self.video_id)
diff --git a/gallery_dl/extractor/webtoons.py b/gallery_dl/extractor/webtoons.py
index 7fbfcc64..c819e03f 100644
--- a/gallery_dl/extractor/webtoons.py
+++ b/gallery_dl/extractor/webtoons.py
@@ -185,7 +185,7 @@ class WebtoonsComicExtractor(WebtoonsBase, Extractor):
"""Extract and return all episode urls in 'page'"""
page = text.extr(page, 'id="_listUl"', '')
return [
- match.group(0)
+ match[0]
for match in WebtoonsEpisodeExtractor.pattern.finditer(page)
]
diff --git a/gallery_dl/extractor/wikiart.py b/gallery_dl/extractor/wikiart.py
index 938c0485..6a6d98a8 100644
--- a/gallery_dl/extractor/wikiart.py
+++ b/gallery_dl/extractor/wikiart.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2019-2023 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
@@ -23,7 +23,7 @@ class WikiartExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.lang = match.group(1)
+ self.lang = match[1]
def items(self):
data = self.metadata()
@@ -73,7 +73,7 @@ class WikiartArtistExtractor(WikiartExtractor):
def __init__(self, match):
WikiartExtractor.__init__(self, match)
- self.artist_name = match.group(2)
+ self.artist_name = match[2]
self.artist = None
def metadata(self):
@@ -95,7 +95,7 @@ class WikiartImageExtractor(WikiartArtistExtractor):
def __init__(self, match):
WikiartArtistExtractor.__init__(self, match)
- self.title = match.group(3)
+ self.title = match[3]
def paintings(self):
title, sep, year = self.title.rpartition("-")
@@ -117,8 +117,8 @@ class WikiartArtworksExtractor(WikiartExtractor):
def __init__(self, match):
WikiartExtractor.__init__(self, match)
- self.group = match.group(2)
- self.type = match.group(3)
+ self.group = match[2]
+ self.type = match[3]
def metadata(self):
return {"group": self.group, "type": self.type}
@@ -137,8 +137,8 @@ class WikiartArtistsExtractor(WikiartExtractor):
def __init__(self, match):
WikiartExtractor.__init__(self, match)
- self.group = match.group(2)
- self.type = match.group(3)
+ self.group = match[2]
+ self.type = match[3]
def items(self):
url = "{}/{}/App/Search/Artists-by-{}".format(
diff --git a/gallery_dl/extractor/wikifeet.py b/gallery_dl/extractor/wikifeet.py
index f7bfeb2d..4f822e5c 100644
--- a/gallery_dl/extractor/wikifeet.py
+++ b/gallery_dl/extractor/wikifeet.py
@@ -21,11 +21,11 @@ class WikifeetGalleryExtractor(GalleryExtractor):
example = "https://www.wikifeet.com/CELEB"
def __init__(self, match):
- self.root = text.root_from_url(match.group(0))
+ self.root = text.root_from_url(match[0])
if "wikifeetx.com" in self.root:
self.category = "wikifeetx"
self.type = "men" if "://men." in self.root else "women"
- self.celeb = match.group(1)
+ self.celeb = match[1]
GalleryExtractor.__init__(self, match, self.root + "/" + self.celeb)
def metadata(self, page):
diff --git a/gallery_dl/extractor/xhamster.py b/gallery_dl/extractor/xhamster.py
index 8fce59b8..1c08854d 100644
--- a/gallery_dl/extractor/xhamster.py
+++ b/gallery_dl/extractor/xhamster.py
@@ -20,7 +20,7 @@ class XhamsterExtractor(Extractor):
category = "xhamster"
def __init__(self, match):
- self.root = "https://" + match.group(1)
+ self.root = "https://" + match[1]
Extractor.__init__(self, match)
diff --git a/gallery_dl/extractor/xvideos.py b/gallery_dl/extractor/xvideos.py
index ce149a2c..e275beec 100644
--- a/gallery_dl/extractor/xvideos.py
+++ b/gallery_dl/extractor/xvideos.py
@@ -92,7 +92,7 @@ class XvideosUserExtractor(XvideosBase, Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.user = match.group(1)
+ self.user = match[1]
def items(self):
url = "{}/profiles/{}".format(self.root, self.user)
diff --git a/gallery_dl/extractor/ytdl.py b/gallery_dl/extractor/ytdl.py
index 03fdcf4a..63f7eca0 100644
--- a/gallery_dl/extractor/ytdl.py
+++ b/gallery_dl/extractor/ytdl.py
@@ -28,7 +28,7 @@ class YoutubeDLExtractor(Extractor):
self.ytdl_module_name = ytdl_module.__name__
# find suitable youtube_dl extractor
- self.ytdl_url = url = match.group(1)
+ self.ytdl_url = url = match[1]
generic = config.interpolate(("extractor", "ytdl"), "generic", True)
if generic == "force":
self.ytdl_ie_key = "Generic"
diff --git a/gallery_dl/extractor/zerochan.py b/gallery_dl/extractor/zerochan.py
index 2e676bdd..ba1ac858 100644
--- a/gallery_dl/extractor/zerochan.py
+++ b/gallery_dl/extractor/zerochan.py
@@ -277,7 +277,7 @@ class ZerochanImageExtractor(ZerochanExtractor):
def __init__(self, match):
ZerochanExtractor.__init__(self, match)
- self.image_id = match.group(1)
+ self.image_id = match[1]
def posts(self):
post = self._parse_entry_html(self.image_id)
diff --git a/gallery_dl/postprocessor/exec.py b/gallery_dl/postprocessor/exec.py
index b3d6e67e..280b9bc3 100644
--- a/gallery_dl/postprocessor/exec.py
+++ b/gallery_dl/postprocessor/exec.py
@@ -115,7 +115,7 @@ class ExecPP(PostProcessor):
util.Popen(args, shell=shell)
def _replace(self, match):
- name = match.group(1)
+ name = match[1]
if name == "_directory":
return quote(self.pathfmt.realdirectory)
if name == "_filename":
diff --git a/gallery_dl/text.py b/gallery_dl/text.py
index f7ecb504..68021578 100644
--- a/gallery_dl/text.py
+++ b/gallery_dl/text.py
@@ -204,7 +204,7 @@ def parse_unicode_escapes(txt):
def _hex_to_char(match):
- return chr(int(match.group(1), 16))
+ return chr(int(match[1], 16))
def parse_bytes(value, default=0, suffixes="bkmgtp"):
diff --git a/setup.py b/setup.py
index 8288206f..83e61b9c 100644
--- a/setup.py
+++ b/setup.py
@@ -28,7 +28,7 @@ def check_file(fname):
VERSION = re.search(
r'__version__\s*=\s*"([^"]+)"',
read("gallery_dl/version.py"),
-).group(1)
+)[1]
FILES = [
(path, [f for f in files if check_file(f)])
diff --git a/test/test_downloader.py b/test/test_downloader.py
index 244563f9..a1acfdd9 100644
--- a/test/test_downloader.py
+++ b/test/test_downloader.py
@@ -332,7 +332,7 @@ class HttpRequestHandler(http.server.BaseHTTPRequestHandler):
status = 206
match = re.match(r"bytes=(\d+)-", self.headers["Range"])
- start = int(match.group(1))
+ start = int(match[1])
headers["Content-Range"] = "bytes {}-{}/{}".format(
start, len(output)-1, len(output))
diff --git a/test/test_job.py b/test/test_job.py
index 3e6f85be..8b997b24 100644
--- a/test/test_job.py
+++ b/test/test_job.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-# Copyright 2021-2023 Mike Fährmann
+# Copyright 2021-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
@@ -364,7 +364,7 @@ class TestExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
self.user = {"id": 123, "name": "test"}
- if match.group(1) == "self":
+ if match[1] == "self":
self.user["self"] = self.user
def items(self):