NewsExtractor/SiteSpecificExtractor/money_udn_com.pm untested

filter: Statementstmt 0.0% 0 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 31 CC 1 SCAR 6.9
CC
1
Cov
0%
headline
2.0
dateline
2.0
journalist
2.0
CRAP 2.0
1 package NewsExtractor::SiteSpecificExtractor::money_udn_com;
2 use utf8;
3 use Moo;
4 extends 'NewsExtractor::GenericExtractor';
5  
6 use Importer 'NewsExtractor::TextUtil' => 'normalize_whitespace';
7  
8 sub headline {
9 my ($self) = @_;
10 my $el = $self->dom->at('#story_art_title');
11 my $txt = $el->all_text;
12 return normalize_whitespace($txt);
13 }
14  
15 sub dateline {
16 my ($self) = @_;
17 my $el = $self->dom->at(".shareBar__info--author > span:nth-child(1)");
18 my $txt = $el->all_text;
19 return normalize_whitespace($txt);
20 }
21  
22 sub journalist {
23 my ($self) = @_;
24 my $el = $self->dom->at(".shareBar__info--author");
25 my $txt = $el->text;
26 return normalize_whitespace($txt);
27 }
28  
29 1;