blib/lib/NewsExtractor/SiteSpecificExtractor/ctee_com_tw.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 9 | 12 | 75.0 |
branch | n/a | ||
condition | 0 | 2 | 0.0 |
subroutine | 3 | 4 | 75.0 |
pod | 0 | 1 | 0.0 |
total | 12 | 19 | 63.1 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | use utf8; | ||||||
2 | 1 | 1 | 6 | use Moo; | |||
1 | 2 | ||||||
1 | 6 | ||||||
3 | 1 | 1 | 41 | extends 'NewsExtractor::GenericExtractor'; | |||
1 | 1 | ||||||
1 | 5 | ||||||
4 | |||||||
5 | use Importer 'NewsExtractor::TextUtil' => qw( normalize_whitespace ); | ||||||
6 | 1 | 1 | 255 | ||||
1 | 2 | ||||||
1 | 6 | ||||||
7 | my ($self) = @_; | ||||||
8 | my $text = $self->tx->result->dom->find("div.single-post-meta a")->map('text')->join(" ") // ''; | ||||||
9 | 0 | 0 | 0 | return normalize_whitespace("". $text); | |||
10 | 0 | 0 | } | ||||
11 | 0 | ||||||
12 | 1; |