($name) = @_;
$name = ($name =~ /^(the\s+)?(.*)$/i)[1];
- $il = uc(($name =~ /^(.)/)[0]);
+ $il = uc(($name =~ /^\W*(.)/)[0]);
$il = "9" if (!($il =~ /[A-Z]/));
if(!($html = _get "http://www.animenewsnetwork.com/encyclopedia/anime.php?list=$il")) {
return undef;
($name) = @_;
$name = ($name =~ /^(the\s+)?(.*)$/i)[1];
- $il = uc(($name =~ /^(.)/)[0]);
+ $il = uc(($name =~ /^\W*(.)/)[0]);
$il = "9" if (!($il =~ /[A-Z]/));
if(!($html = _get "http://www.animenewsnetwork.com/encyclopedia/anime.php?list=$il")) {
return undef;
if($html =~ /$kind theme:<\/strong>\s*\n/igc) {
my(@parts, $ct, $buf);
- while($html =~ /\G\s*\<div class=\"tab\"\>(([^<>]|\<i\>|<\/i>)+)<\/div>/igc) {
+ while($html =~ /\G\s*\<div class=\"tab\"\>(([^<>]|\<i\>|<\/i>)+)(<span[^<>]*>[^<>]*<img[^<>]*>[^<>]*<\/span>)?<\/div>/igc) {
$buf = $1;
# 0 1 2 3 4 5 6 7 8 9 10 1112
if(@parts = ($buf =~ /(\#(\d+):)?\s*\"([^\"\(]+\S)(\s*\((\<i\>(.*)<\/i>( - \s*)?)?([^<>]+)?\))?\"\s+by\s+([^\(]*[^\(\s])(\s*\(eps? (\d+)(-(\d+))?\))?/i)) {