From 543c0783f9303af43b1bd013b7bf924d06a39943 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Thu, 26 Oct 2023 20:23:21 +0200 Subject: [PATCH] Minor regex cleanup --- changedetectionio/processors/text_json_diff.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/changedetectionio/processors/text_json_diff.py b/changedetectionio/processors/text_json_diff.py index afd8ec36..6b7ff329 100644 --- a/changedetectionio/processors/text_json_diff.py +++ b/changedetectionio/processors/text_json_diff.py @@ -338,7 +338,8 @@ class perform_site_check(difference_detection_processor): # incase they specified something in '/.../x' if re.search(PERL_STYLE_REGEX, s_re, re.IGNORECASE): regex = html_tools.perl_style_slash_enclosed_regex_to_options(s_re) - result = re.findall(regex.encode('utf-8'), stripped_text_from_html) + # Both the regex (r) and (stripped_text_from_html) should be bytes by now + result = re.findall(rf"{regex}".encode('utf-8'), stripped_text_from_html) for l in result: if type(l) is tuple: