From: Aquila Macedo <aquilamacedo@riseup.net>
Date: Tue, 25 Mar 2025 17:22:47 -0300
Subject: Fix SyntaxWarning in regex byte strings

Resolve SyntaxWarning by using raw byte strings (br'') in regex patterns
Forwarded: https://github.com/jekyc/wig/pull/42
Last-Update: 2025-03-27
Bug-Debian: https://bugs.debian.org/1087181
---
 classes/request2.py | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/classes/request2.py b/classes/request2.py
index 4dff657..44b9151 100644
--- a/classes/request2.py
+++ b/classes/request2.py
@@ -26,22 +26,22 @@ def _clean_page(page):
 	# remove information from the page that might not be static
 	
 	# time
-	page = re.sub(b'(\d?\d:?){2,3}', b'',page)
+	page = re.sub(br'(\d?\d:?){2,3}', b'',page)
 	page = re.sub(b'AM', b'',page, flags=re.IGNORECASE)
 	page = re.sub(b'PM', b'',page, flags=re.IGNORECASE)
-	page = re.sub(b'(\d){13}', b'', page) # timestamp
+	page = re.sub(br'(\d){13}', b'', page) # timestamp
 
 	# date with 4 digit year
-	page = re.sub(b'(\d){8}', '',page)
-	page = re.sub(b'\d{4}-\d{2}-\d{2}', b'',page)
-	page = re.sub(b'\d{4}/\d{2}/\d{2}', b'',page)
-	page = re.sub(b'\d{2}-\d{2}-\d{4}', b'',page)
-	page = re.sub(b'\d{2}/\d{2}/\d{4}', b'',page)
+	page = re.sub(br'(\d){8}', '',page)
+	page = re.sub(br'\d{4}-\d{2}-\d{2}', b'',page)
+	page = re.sub(br'\d{4}/\d{2}/\d{2}', b'',page)
+	page = re.sub(br'\d{2}-\d{2}-\d{4}', b'',page)
+	page = re.sub(br'\d{2}/\d{2}/\d{4}', b'',page)
 
 	# date with 2 digit year
-	page = re.sub( b'(\d){6}', '',page)
-	page = re.sub( b'\d{2}-\d{2}-\d{2}', b'',page)
-	page = re.sub( b'\d{2}/\d{2}/\d{2}', b'',page)
+	page = re.sub( br'(\d){6}', '',page)
+	page = re.sub( br'\d{2}-\d{2}-\d{2}', b'',page)
+	page = re.sub( br'\d{2}/\d{2}/\d{2}', b'',page)
 	
 	# links and paths
 	page = re.sub( b'/[^ ]+',  b'', page)
