Dolda2000 GitWeb
/
utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4442300
)
ANN: Fixed name detection bug in presence of "The".
author
Fredrik Tolf
<fredrik@dolda2000.com>
Wed, 14 Jul 2010 19:16:30 +0000
(21:16 +0200)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Wed, 14 Jul 2010 19:16:30 +0000
(21:16 +0200)
ANN.pm
patch
|
blob
|
blame
|
history
diff --git
a/ANN.pm
b/ANN.pm
index
8b311f4
..
f10e869
100644
(file)
--- a/
ANN.pm
+++ b/
ANN.pm
@@
-58,9
+58,9
@@
sub getlist
# The only way to recognize entries that seems sure is to look
# after the "HOVERLINE" class.
# The only way to recognize entries that seems sure is to look
# after the "HOVERLINE" class.
- while($html =~ /<A\s.*CLASS=HOVERLINE\s.*HREF=\"([^\"]+)\"
.*>(\<small\>.*\<\/small\>)?
([^<]+)<\//ig) {
- if((substr "" . lc $
3
, 0, length $name) eq lc $name) {
- push @ret, $
3
;
+ while($html =~ /<A\s.*CLASS=HOVERLINE\s.*HREF=\"([^\"]+)\"
[^>]*>(<FONT[^>]*>)?(\<small\>.*\<\/small\>)?\s*
([^<]+)<\//ig) {
+ if((substr "" . lc $
4
, 0, length $name) eq lc $name) {
+ push @ret, $
4
;
}
}
# push @ret, $1 while $html =~ /<A\s.*CLASS=HOVERLINE\s.*>.*<FONT.*>([^<>]*$name[^<>]*)<\/FONT/ig;
}
}
# push @ret, $1 while $html =~ /<A\s.*CLASS=HOVERLINE\s.*>.*<FONT.*>([^<>]*$name[^<>]*)<\/FONT/ig;
@@
-83,8
+83,8
@@
sub getid
# The only way to recognize entries that seems sure is to look
# after the "HOVERLINE" class.
# The only way to recognize entries that seems sure is to look
# after the "HOVERLINE" class.
- while($html =~ /<A\s.*CLASS=HOVERLINE\s.*HREF=\"([^\"]+)\"
.*>(\<small\>.*\<\/small\>)?
([^<]+)<\//ig) {
- if((substr "" . lc $
3
, 0, length $name) eq lc $name) {
+ while($html =~ /<A\s.*CLASS=HOVERLINE\s.*HREF=\"([^\"]+)\"
[^>]*>(<FONT[^>]*>)?(\<small\>.*\<\/small\>)?\s*
([^<]+)<\//ig) {
+ if((substr "" . lc $
4
, 0, length $name) eq lc $name) {
return ($1 =~ /id=(\d+)$/)[0];
}
}
return ($1 =~ /id=(\d+)$/)[0];
}
}