package BookPub::RDAS::Parser::ProductSearch::Amazon::Author;

use lib '/app/tools/rdas/lib';
use base 'RDAS::Parser::Item';

use Data::Dumper;

sub value {
    my $token = shift->token();

    return unless ($token);

    my ($dataCell) = $token->look_down( _tag => 'td', class => 'dataColumn' );
    my ($table) = $dataCell->look_down( _tag => 'table' ) if ($dataCell);
    my ($titleCell) = $table->look_down( _tag => 'td' ) if ($table);
    $title = $1 if ( $titleCell && $titleCell->as_HTML() =~ /a> by (.*) <span class="binding/ );

    return $title;
}

1;
