# The only way to recognize entries that seems sure is to look
# after the "HOVERLINE" class.
- push @ret, $1 while $html =~ /<A\s.*CLASS=HOVERLINE\s.*>.*<FONT.*>([^<>]*$name[^<>]*)<\/FONT/ig;
+ while($html =~ /<A\s.*CLASS=HOVERLINE\s.*HREF=\"([^\"]+)\".*>([^<]+)<\//ig) {
+ if((substr "" . lc $2 , 0, length $name) eq lc $name) {
+ push @ret, $2;
+ }
+ }
+ # push @ret, $1 while $html =~ /<A\s.*CLASS=HOVERLINE\s.*>.*<FONT.*>([^<>]*$name[^<>]*)<\/FONT/ig;
return @ret;
}
# The only way to recognize entries that seems sure is to look
# after the "HOVERLINE" class.
- (($url) = ($html =~ /<A\s.*CLASS=HOVERLINE\s.*HREF=\"([^\"]+)\".*$name/i)) || return;
+ while($html =~ /<A\s.*CLASS=HOVERLINE\s.*HREF=\"([^\"]+)\".*>([^<]+)<\//ig) {
+ if((substr "" . lc $2 , 0, length $name) eq lc $name) {
+ return ($1 =~ /id=(\d+)$/)[0];
+ }
+ }
- return ($url =~ /\?id=(\d+)$/)[0];
+ return undef;
}
sub geturl
my(@parts, $ct, $buf);
while($html =~ /\G\<br\> (([^<>]|\<i\>|<\/i>)+)/igc) {
$buf = $1;
- # 0 1 2 3 4 5 6 7 8 9 10 11
- if(@parts = ($buf =~ /(\#(\d+):)?\s*\"([^\"\(]+)(\s*\((\<i\>(.*)<\/i>(;\s*)?)?([^<>]+)?\))?\"\s+by\s+([^\(]*[^\(\s])(\s*\(eps (\d+)-(\d+)?\))?/i)) {
+ # 0 1 2 3 4 5 6 7 8 9 10 11
+ if(@parts = ($buf =~ /(\#(\d+):)?\s*\"([^\"\(]+\S)(\s*\((\<i\>(.*)<\/i>(;\s*)?)?([^<>]+)?\))?\"\s+by\s+([^\(]*[^\(\s])(\s*\(eps (\d+)-(\d+)?\))?/i)) {
$ct = {};
$ct->{"num"} = $parts[1] if defined $parts[1];
if(defined $parts[5]) {