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             use utf8;
2 1     1   6 use Moo;
  1         2  
  1         5  
3 1     1   26 extends 'NewsExtractor::GenericExtractor';
  1         2  
  1         4  
4              
5             use Importer 'NewsExtractor::TextUtil' => 'normalize_whitespace';
6 1     1   255  
  1         2  
  1         5  
7             my ($self) = @_;
8             my $el = $self->dom->at("meta[property='article:published_time']");
9 0     0 0   return "". $el->attr('content');
10 0           }
11 0            
12             my ($self) = @_;
13             my $el = $self->dom->at(".name");
14             my $txt = $el->text;
15 0     0 0   return normalize_whitespace($txt);
16 0           }
17 0            
18 0           1;