X-Git-Url: http://dolda2000.com/gitweb/?p=utils.git;a=blobdiff_plain;f=ann.py;h=0b583ffba69d5bff800cb9dd2ef374fe28c80f75;hp=935e0a9cbe50ca078c8e11b9a3ee0aaba68b78c4;hb=8b09dc89e6081cfc76fee513be8dac9e39b6305f;hpb=a613494aaba2c06b589993621d772b038c47a84c diff --git a/ann.py b/ann.py index 935e0a9..0b583ff 100644 --- a/ann.py +++ b/ann.py @@ -169,16 +169,19 @@ def getlist(name): ret = [] ldiv = afind(afind(d, "div", id="maincontent"), "div", "lst") for link in ldiv("a", "HOVERLINE"): - mn = "" + rawname = "" for el in link.font: if isinstance(el, str): - mn += el.strip() + rawname += el.strip() + mn = rawname.lower() mn = s(mn, "^a\s+", "") + mn = mn.replace("\u014d", "ou") + mn = mn.replace("\u016b", "uu") if mn.lower().startswith(name.lower()): m = linkpat.match(link["href"]) if not m: raise incompatible() found = anime.byid(int(m.groups()[0])) - found.rawname = mn + found.rawname = rawname ret.append(found) return ret