From aeb97e62d12504054e2f6a086273f427e5f67a7d Mon Sep 17 00:00:00 2001 From: Lertsenem Date: Fri, 24 May 2024 09:11:39 +0200 Subject: [PATCH] Update smash.gg urls And add a todo list --- lokrez/__init__.py | 4 ++-- todo.org | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 todo.org diff --git a/lokrez/__init__.py b/lokrez/__init__.py index f82ba8e..3b66745 100644 --- a/lokrez/__init__.py +++ b/lokrez/__init__.py @@ -192,7 +192,7 @@ def get_infos_from_url( url_parsed = urllib.parse.urlparse(url) - if url_parsed.netloc not in [ "smash.gg", "start.gg" ]: + if url_parsed.netloc not in [ "smash.gg", "start.gg", "www.smash.gg", "www.start.gg" ]: raise ValueError("Unsupported domain name") if outform not in [ "dict", "lkrz" ]: raise ValueError("Unsupported outform") @@ -202,7 +202,7 @@ def get_infos_from_url( event = None # ------------------------------------------------------------------------- - if url_parsed.netloc in [ "smash.gg", "start.gg" ]: + if url_parsed.netloc in [ "smash.gg", "start.gg", "www.smash.gg", "www.start.gg" ]: if (url_parsed.path.split("/")[1] != "tournament"): log.error("Incomplete URL '{}'".format(url)) diff --git a/todo.org b/todo.org new file mode 100644 index 0000000..103bb1d --- /dev/null +++ b/todo.org @@ -0,0 +1,4 @@ +#+TITLE: todo list +------------------------------------------------------------------------------- +* Ajouter les dessins de Mael en bonus +* Ajouter perso "random"