line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
use utf8; |
2
|
1
|
|
|
1
|
|
20
|
use Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
3
|
1
|
|
|
1
|
|
27
|
extends 'NewsExtractor::JSONLDExtractor'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
4
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use Importer 'NewsExtractor::TextUtil' => qw( html2text ); |
6
|
1
|
|
|
1
|
|
249
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
6
|
|
7
|
|
|
|
|
|
|
my ($self) = @_; |
8
|
|
|
|
|
|
|
# my $text = $self->schema_ld->{articleBody} // $self->schema_ld->{description} // ''; |
9
|
0
|
|
|
0
|
0
|
|
my $body = $self->tx->result->dom->at("div.article-body"); |
10
|
|
|
|
|
|
|
$body->find(".article-hash-tag")->map('remove'); |
11
|
0
|
|
|
|
|
|
my $text = html2text( $body->content ); |
12
|
0
|
|
|
|
|
|
return $text; |
13
|
0
|
|
|
|
|
|
} |
14
|
0
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
1; |