From a613494aaba2c06b589993621d772b038c47a84c Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Sun, 22 Dec 2019 04:22:49 +0100 Subject: [PATCH 1/1] ann.py: Fixed searching for names beginning with "a ". --- ann.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ann.py b/ann.py index ee3d472..935e0a9 100644 --- a/ann.py +++ b/ann.py @@ -157,7 +157,7 @@ class anime(object): linkpat = re.compile("^/encyclopedia/anime\\.php\\?id=(\d+)$") def getlist(name): - name = s(name, "^the\s+", "") + name = s(name, "^(the|a)\s+", "") if len(name) < 1: raise error("list() needs a prefix of at least one character") fc = name[0] @@ -173,6 +173,7 @@ def getlist(name): for el in link.font: if isinstance(el, str): mn += el.strip() + mn = s(mn, "^a\s+", "") if mn.lower().startswith(name.lower()): m = linkpat.match(link["href"]) if not m: -- 2.11.0