'match.group(N)' -> 'match[N]' (#7671)

2.5x faster
This commit is contained in:
Mike Fährmann
2025-06-18 12:59:37 +02:00
parent 475506cc39
commit 41191bb60a
135 changed files with 363 additions and 363 deletions

View File

@@ -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)