From 7b391be89ec7ff7e3a7afbd1b0958ed75209cf97 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Sat, 19 Mar 2022 01:53:39 +0100 Subject: [PATCH] =?UTF-8?q?Cosmetics,=20replace=20safe=20filename=20regex?= =?UTF-8?q?=20with=20triple-quoted=20string=20so=20we=20don't=20have=20to?= =?UTF-8?q?=20ba=CC=A5ash-escape=20literal=20double=20quote?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mvw-dl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mvw-dl.py b/mvw-dl.py index 280c94d..a9250a7 100644 --- a/mvw-dl.py +++ b/mvw-dl.py @@ -359,7 +359,7 @@ def get_safe_filename( dirty_filename: str) -> str: """https://stackoverflow.com/a/71199182""" - clean_filename = re.sub(r"[/\\?%*:|\"<>\x7F\x00-\x1F]", "-", dirty_filename) + clean_filename = re.sub(r"""[/\\?%*:|"<>\x7F\x00-\x1F]""", "-", dirty_filename) return clean_filename