X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=ANN.pm;h=a9e8014a1bfbb4909136e4befbe6dd320ab1f7ef;hb=26c14f89ca84cd6d23718948c1da81280ff12c0a;hp=746cf1540be07fd7ce8454c2098a3fdebb074758;hpb=3b5018db546d352a46cae32a64f17a72196a1275;p=utils.git
diff --git a/ANN.pm b/ANN.pm
index 746cf15..a9e8014 100644
--- a/ANN.pm
+++ b/ANN.pm
@@ -107,10 +107,10 @@ sub getthemes
if($html =~ /$kind theme:<\/strong>\s*\n/igc) {
my(@parts, $ct, $buf);
- while($html =~ /\G\s*\
(([^<>]|\
|<\/i>)+)<\/div>/igc) {
+ while($html =~ /\G\s*\(([^<>]|\|<\/i>)+)<\/div>/igc) {
$buf = $1;
- # 0 1 2 3 4 5 6 7 8 9 10 11
- if(@parts = ($buf =~ /(\#(\d+):)?\s*\"([^\"\(]+\S)(\s*\((\(.*)<\/i>( - \s*)?)?([^<>]+)?\))?\"\s+by\s+([^\(]*[^\(\s])(\s*\(eps (\d+)-(\d+)?\))?/i)) {
+ # 0 1 2 3 4 5 6 7 8 9 10 1112
+ if(@parts = ($buf =~ /(\#(\d+):)?\s*\"([^\"\(]+\S)(\s*\((\(.*)<\/i>( - \s*)?)?([^<>]+)?\))?\"\s+by\s+([^\(]*[^\(\s])(\s*\(eps? (\d+)(-(\d+))?\))?/i)) {
$ct = {};
$ct->{"num"} = $parts[1] if defined $parts[1];
if(defined $parts[5]) {
@@ -122,7 +122,7 @@ sub getthemes
$ct->{"ent"} = decode_entities($parts[7]) if defined $parts[7];
$ct->{"prf"} = decode_entities($parts[8]) if defined $parts[8];
$ct->{"fep"} = $parts[10] if defined $parts[10];
- $ct->{"lep"} = $parts[11] if defined $parts[11];
+ $ct->{"lep"} = $parts[12] if defined $parts[12];
push @ret, $ct;
}
}
@@ -141,7 +141,7 @@ sub getseries
}
$ret{"url"} = geturl $id;
- ($buf) = ($html =~ /\Anime News Network - ([^<]*)<\/TITLE>/);
+ ($buf) = ($html =~ /\([^<]*) - Anime News Network<\/title>/);
if($buf =~ /\([^\)]+\)$/) {
($ret{"name"}, $ret{"type"}) = ($buf =~ /^(.*[^\s])\s*\(([^\)]+)\)$/);
} else {