git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/utils@304
959494ce-11ee-0310-bf91-
de5d638817bd
$html = _get "http://www.animenewsnetwork.com/encyclopedia/anime.php?id=$id";
$ret{"url"} = "http://www.animenewsnetwork.com/encyclopedia/anime.php?id=$id";
- ($ret{"name"}) = ($html =~ /\<TITLE\>Anime News Network - ([^<]*)<\/TITLE>/);
+ ($buf) = ($html =~ /\<TITLE\>Anime News Network - ([^<]*)<\/TITLE>/);
+ if($buf =~ /\([^\)]+\)$/) {
+ ($ret{"name"}, $ret{"type"}) = ($buf =~ /^(.*[^\s])\s*\(([^\)]+)\)$/);
+ } else {
+ $ret{"name"} = $buf;
+ }
if(($buf) = ($html =~ /vintage:<\/b>\n([^<]+)</is)) {
$ret{"vtg"} = $buf;
}