replace standard library 're' uses with 'util.re()'

This commit is contained in:
Mike Fährmann
2025-06-06 12:26:21 +02:00
parent e1f03a5a93
commit b5c88b3d3e
45 changed files with 143 additions and 220 deletions

View File

@@ -9,8 +9,7 @@
"""Extractors for https://www.imagebam.com/"""
from .common import Extractor, Message
from .. import text
import re
from .. import text, util
class ImagebamExtractor(Extractor):
@@ -70,9 +69,8 @@ class ImagebamGalleryExtractor(ImagebamExtractor):
page, 'id="gallery-name">', '<').strip())}
def images(self, page):
findall = re.compile(r'<a href="https://www\.imagebam\.com'
r'(/(?:image/|view/M)[a-zA-Z0-9]+)').findall
findall = util.re(r'<a href="https://www\.imagebam\.com'
r'(/(?:image/|view/M)[a-zA-Z0-9]+)').findall
paths = []
while True:
paths += findall(page)