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

@@ -12,7 +12,6 @@ from .booru import BooruExtractor
from ..cache import cache
from .. import text, util, exception
import collections
import re
BASE_PATTERN = r"(?:https?://)?(?:www\.)?zerochan\.net"
@@ -127,7 +126,7 @@ class ZerochanExtractor(BooruExtractor):
return data
def _parse_json(self, txt):
txt = re.sub(r"[\x00-\x1f\x7f]", "", txt)
txt = util.re(r"[\x00-\x1f\x7f]").sub("", txt)
main, _, tags = txt.partition('tags": [')
item = {}