File Coverage

blib/lib/NewsExtractor/SiteSpecificExtractor/m_news_cctv_com.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   6 use Moo;
  1         2  
  1         5  
3 1     1   27 extends 'NewsExtractor::GenericExtractor';
  1         1  
  1         5  
4              
5             use Importer 'NewsExtractor::TextUtil' => qw(normalize_whitespace reformat_dateline);
6 1     1   258  
  1         2  
  1         6  
7             my ($self) = @_;
8             my $el = $self->dom->at('span.info i') or return;
9 0     0 0   return reformat_dateline( $el->all_text(), '+08:00' );
10 0 0         }
11 0            
12             my ($self) = @_;
13             my ($txt) = $self->content_text() =~ m/( (?:总台记者|编辑) (.+?))\z/xg;
14             $txt = normalize_whitespace($txt);
15 0     0 0   return $txt;
16 0           }
17 0            
18 0           1;