nysus has asked for the wisdom of the Perl Monks concerning the following question:
I want to grab the value of the href property form the <link> tag with the Web::Scraper module. Here's the relevant perl code:<span itemprop="thumbnail" itemscope itemtype="http://schema.org/I +mageObject"> <link itemprop="url" href="http://blahblah.org/video/thumbnail +_23432230.jpg"> <meta itemprop="width" content="1280"> <meta itemprop="height" content="720"> </span>
No matter what I try, $url returns undefined. I'm using version .36 of the Web::Scraper module. </code>my $div = scraper { process 'span[itemprop="thumbnail"] > link', url => '@href'; }; my $res = $div->scrape( $html ); $url = $res->{url};
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon";
$nysus = $PM . $MCF;
Click here if you love Perl Monks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Pulling data from child elements using Web::Scraper
by nysus (Parson) on Jan 18, 2015 at 13:03 UTC | |
by LanX (Saint) on Jan 18, 2015 at 13:41 UTC | |
by RonW (Parson) on Jan 19, 2015 at 22:49 UTC | |
by Anonymous Monk on Jan 18, 2015 at 21:07 UTC | |
by karlgoethebier (Abbot) on Jan 19, 2015 at 12:45 UTC | |
by Mr. Muskrat (Canon) on Jan 20, 2015 at 21:45 UTC | |
|
Re: Pulling data from child elements using Web::Scraper
by GotToBTru (Prior) on Jan 18, 2015 at 06:30 UTC |