Dolda2000 GitWeb
/
utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f7bd9b5
)
ann.py: Improved list matching.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 22 Dec 2019 14:32:14 +0000
(15:32 +0100)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 22 Dec 2019 14:32:14 +0000
(15:32 +0100)
ann.py
patch
|
blob
|
blame
|
history
diff --git
a/ann.py
b/ann.py
index
935e0a9
..
0b583ff
100644
(file)
--- 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"):
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):
for el in link.font:
if isinstance(el, str):
- mn += el.strip()
+ rawname += el.strip()
+ mn = rawname.lower()
mn = s(mn, "^a\s+", "")
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]))
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
ret.append(found)
return ret