in reply to Re^3: scrape a webpage
in thread scrape a webpage

I read $mech->value() doc but still can't figure out what to do. If I don't "trim" $B, I get this printout: للللل4WD/AWD I'm lost.

Replies are listed 'Best First'.
Re^5: scrape a webpage
by Corion (Patriarch) on May 28, 2017 at 06:55 UTC

    Maybe try $B->{value} then, but you will have to stay within the Firefox framework then and not use any other HTML thing like HTML::TreeBuilder::LibXML.

    If you have your tree already in HTML::TreeBuilder::LibXML, then use what the HTML::TreeBuilder::LibXML documentation suggests:

    my $value = $node->attr('value');