From 7f89d071aa4347afa8683cb339059afea2d7e060 Mon Sep 17 00:00:00 2001 From: klea Date: Thu, 25 Dec 2025 11:14:47 +0000 Subject: wikibot(discourse): fix regex pattern thingy invalid characters of course if i forget to backslash backslashes twice --- wikibot/discourse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wikibot/discourse.py b/wikibot/discourse.py index fa19cad..4ca62f0 100644 --- a/wikibot/discourse.py +++ b/wikibot/discourse.py @@ -10,7 +10,7 @@ import re # sort | uniq -c | sort -hr # and then manually curated the subdomain part of the regex extractionPattern = re.compile('(?:^\\* \\[?ht)[^:/]+://(\\S+)') -text_version = re.compile('\[(?:[^\\s:/]+://\\S+) (.*)\]') +text_version = re.compile('\\[(?:[^\\s:/]+://\\S+) (.*)\\]') def get_cleaned_url(line): # Extract the forum name from the first [] on a line, else domain from the first URL appearing on a line; returns None if no URL is found -- cgit v1.3.1-10-gc9f91