blib/lib/NewsExtractor/SiteSpecificExtractor/news_tvbs_com_tw.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 9 | 13 | 69.2 |
branch | n/a | ||
condition | n/a | ||
subroutine | 3 | 4 | 75.0 |
pod | 0 | 1 | 0.0 |
total | 12 | 18 | 66.6 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | use utf8; | ||||||
2 | 1 | 1 | 7 | use Moo; | |||
1 | 1 | ||||||
1 | 6 | ||||||
3 | 1 | 1 | 27 | extends 'NewsExtractor::GenericExtractor'; | |||
1 | 2 | ||||||
1 | 4 | ||||||
4 | |||||||
5 | use Importer 'NewsExtractor::TextUtil' => 'normalize_whitespace'; | ||||||
6 | 1 | 1 | 268 | ||||
1 | 4 | ||||||
1 | 6 | ||||||
7 | my ($self) = @_; | ||||||
8 | my $el = $self->dom->at("div.title h4.font_color5"); | ||||||
9 | 0 | 0 | 0 | my $txt = $el->all_text; | |||
10 | 0 | return normalize_whitespace($txt); | |||||
11 | 0 | } | |||||
12 | 0 | ||||||
13 | 1; |