PDAScraper/SFGateWeird.pm untested

filter: Statementstmt 0.0% 0 / 2 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 1 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 4 CC 1 SCAR 6.9
CC
1
Cov
0%
config
2.0
CRAP 2.0
1 package WWW::PDAScraper::SFGateWeird;
2  
3 # PDAScraper.pm rules for scraping the
4 # Foo website
5  
6 sub config {
7 return {
8 name => 'SF Gate Weird News',
9 # Name of the website. Arbitrary text.
10  
11 start_from => 'http://www.sfgate.com/news/bondage/',
12 # URL where the scraper should find the links.
13  
14 url_regex => [ '$', '&type=printable' ],
15 # This is the simple form of the url_regex, which
16 # is used to change a regular link to a "print-friendly"
17 # link. Simple because there are no backreferences
18 # neede on the RHS.
19  
20 chunk_regex => qr{<FONT FACE="Geneva,Arial,sans-serif" SIZE="2"><B>(.*?)<TD WIDTH="15">}s
21 # A regular expression which returns your desired
22 # chunk of the page as $1. Using chunk_spec is better.
23
24 };
25 }
26  
27 1;