shivanisai has asked for the wisdom of the Perl Monks concerning the following question:
Look at the following html source
If I write css selector for this html source as<div><p><a href="http://www.somesite.com.br/site/lojavirtual/produtos. +asp?id=2507 "><img alt="ESPELHO RETROVISOR - S00224 - SAFETY" src="http://www.some +site.com.br /site/lojavirtual/produtos/2507/peq.jpg" /> </a></div>
$scraper2->select('div p a')->data;
We can extract the {href} value of tag. But I need a single CSS selector to extract both href value and <img> src value.How can we write the selector? or could you give any sites to refer to write the CSS selectors efficiently?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to write CSS selector to extract more than one value from html source using scrappy module?
by Corion (Patriarch) on May 16, 2011 at 12:03 UTC | |
Re: How to write CSS selector to extract more than one value from html source using scrappy module?
by Anonymous Monk on May 16, 2011 at 12:05 UTC | |
by Anonymous Monk on May 16, 2011 at 13:13 UTC |
Back to
Seekers of Perl Wisdom