File Coverage

blib/lib/NewsExtractor/SiteSpecificExtractor/www_taipeitimes_com.pm
Criterion Covered Total %
statement 9 16 56.2
branch n/a
condition n/a
subroutine 3 5 60.0
pod 0 2 0.0
total 12 23 52.1


line stmt bran cond sub pod time code
1             package NewsExtractor::SiteSpecificExtractor::www_taipeitimes_com;
2 1     1   8 use utf8;
  1         3  
  1         6  
3 1     1   35 use Moo;
  1         3  
  1         6  
4             extends 'NewsExtractor::GenericExtractor';
5              
6 1     1   330 use Importer 'NewsExtractor::TextUtil' => 'normalize_whitespace';
  1         2  
  1         7  
7              
8             sub dateline {
9 0     0 0   my ($self) = @_;
10 0           my $el = $self->dom->at("meta[property='article:published_time']");
11 0           return "". $el->attr('content');
12             }
13              
14             sub journalist {
15 0     0 0   my ($self) = @_;
16 0           my $el = $self->dom->at(".name");
17 0           my $txt = $el->text;
18 0           return normalize_whitespace($txt);
19             }
20              
21             1;