File Coverage

blib/lib/NewsExtractor/SiteSpecificExtractor/www_peopo_org.pm
Criterion Covered Total %
statement 6 17 35.2
branch n/a
condition n/a
subroutine 2 5 40.0
pod 0 3 0.0
total 8 25 32.0


line stmt bran cond sub pod time code
1             package NewsExtractor::SiteSpecificExtractor::www_peopo_org;
2 1     1   8 use utf8;
  1         2  
  1         7  
3 1     1   38 use Moo;
  1         2  
  1         6  
4             extends 'NewsExtractor::GenericExtractor';
5              
6             sub headline {
7 0     0 0   my ($self) = @_;
8 0           my $el = $self->dom->at("h1.page-title");
9 0           return $el->text;
10             }
11              
12             sub dateline {
13 0     0 0   my ($self) = @_;
14 0           my $el = $self->dom->at("div.submitted > span");
15 0           my $dateline = $el->text;
16 0           $dateline =~ s{\A ([0-9]{4})\.([0-9]{2})\.([0-9]{2}) \s+ ([0-9]{2}):([0-9]{2}) \z}{$1-$2-$3T$4:$5:00+08:00}x;
17 0           return $dateline;
18             }
19              
20             sub journalist {
21 0     0 0   my ($self) = @_;
22 0           my $el = $self->dom->at("div.user-infos > h3 > a");
23 0           return $el->text;
24             }
25              
26             1;