From 5c12e76cf984ceeaae6d4511a9dda54f1a4f2d86 Mon Sep 17 00:00:00 2001 From: kenkeiras Date: Wed, 5 Jul 2017 01:04:10 +0200 Subject: [PATCH] Allow more characters on names. --- macli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macli.py b/macli.py index 5fdc398..95ebdb7 100644 --- a/macli.py +++ b/macli.py @@ -12,7 +12,7 @@ from bs4 import BeautifulSoup as bs4 USER_AGENT = 'miniarchiver bot' ARCHIVE_ROOT = 'archive' DEFAULT_NAME = 'archived_web' -ALLOWED_NAMES_RE = re.compile(r'^[- .,a-zA-Z0-9]+$') +ALLOWED_NAMES_RE = re.compile(r'^[- .,:@a-zA-Z0-9]+$') OBJECT_TYPE_DESCRIPTORS = ( @@ -149,7 +149,7 @@ def main(): path = os.path.join(ARCHIVE_ROOT, args.name) if not ALLOWED_NAMES_RE.match(args.name): - print(("Only characters 'a-zA-Z0-9', spaces, dots, commas and dashes" + print(("Only characters 'a-zA-Z0-9', spaces, or '-.,:@'" "are allowed as names.")) return