File Coverage

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


line stmt bran cond sub pod time code
1             use utf8;
2 1     1   7 use Moo;
  1         2  
  1         5  
3 1     1   25 extends 'NewsExtractor::GenericExtractor';
  1         2  
  1         4  
4              
5             use Importer 'NewsExtractor::TextUtil' => 'u';
6 1     1   244  
  1         2  
  1         7  
7             my ($self) = @_;
8             my $el = $self->dom->at(".ReportDate > a:nth-child(1)") or return;
9 0     0 0   my ($yyyy, $mm, $dd) = split /-/, $el->all_text;
10 0 0         return u(sprintf('%04d/%02d/%02d', $yyyy, $mm, $dd));
11 0           }
12 0            
13             my ($self) = @_;
14             my ($name) = $self->content_text =~ m{(記者\s*([^/]+?)\s*/.+?報導)};
15             return $name;
16 0     0 0   }
17 0            
18 0           1;