From 9edbee7285277faf3701bc3c003bf768fbfcd9f6 Mon Sep 17 00:00:00 2001 From: nanos Date: Thu, 15 Jun 2023 07:56:53 +0100 Subject: [PATCH] Deal better with it, when someone provides a URL instead of a server name (#50, #45) --- find_posts.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/find_posts.py b/find_posts.py index 7fff777..e442d9c 100644 --- a/find_posts.py +++ b/find_posts.py @@ -767,6 +767,9 @@ if __name__ == "__main__": if(arguments.server == None or arguments.access_token == None): log("You must supply at least a server name and an access token") sys.exit(1) + + # in case someone provided the server name as url instead, + setattr(arguments, 'server', re.sub(r"^(https://)?([^/]*)/?$", "\\2", arguments.server)) runId = uuid.uuid4()