blib/lib/NewsExtractor/SiteSpecificExtractor/talk_ltn_com_tw.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 6 | 9 | 66.6 |
branch | 0 | 2 | 0.0 |
condition | n/a | ||
subroutine | 2 | 3 | 66.6 |
pod | 0 | 1 | 0.0 |
total | 8 | 15 | 53.3 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | use utf8; | ||||||
2 | 1 | 1 | 6 | use Moo; | |||
1 | 2 | ||||||
1 | 4 | ||||||
3 | 1 | 1 | 26 | extends 'NewsExtractor::JSONLDExtractor'; | |||
1 | 2 | ||||||
1 | 5 | ||||||
4 | |||||||
5 | with 'NewsExtractor::Role::ContentTextExtractor'; | ||||||
6 | |||||||
7 | my ($self) = @_; | ||||||
8 | my $el = $self->dom->at('div.writer > a:nth-child(1)') or return; | ||||||
9 | 0 | 0 | 0 | return $el->attr('data-desc'); | |||
10 | 0 | 0 | } | ||||
11 | 0 | ||||||
12 | 1; |