line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
use utf8; |
2
|
1
|
|
|
1
|
|
6
|
use Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
3
|
1
|
|
|
1
|
|
26
|
extends 'NewsExtractor::SiteSpecificExtractor'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use Importer 'NewsExtractor::TextUtil' => qw< normalize_whitespace html2text >; |
6
|
1
|
|
|
1
|
|
280
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
7
|
|
|
|
|
|
|
my ($self) = @_; |
8
|
|
|
|
|
|
|
my $el = $self->dom->at('div.container.page-name > h1'); |
9
|
0
|
|
|
0
|
0
|
|
return $el->all_text; |
10
|
0
|
|
|
|
|
|
} |
11
|
0
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my ($self) = @_; |
13
|
|
|
|
|
|
|
my $el = $self->dom->at('p.author .time'); |
14
|
|
|
|
|
|
|
my $txt = $el->all_text; |
15
|
0
|
|
|
0
|
0
|
|
return $txt; |
16
|
0
|
|
|
|
|
|
} |
17
|
0
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
|
my ($self) = @_; |
19
|
|
|
|
|
|
|
my $el = $self->dom->at('p.author'); |
20
|
|
|
|
|
|
|
$el->children("div.share")->map('remove'); |
21
|
|
|
|
|
|
|
return normalize_whitespace($el->text); |
22
|
0
|
|
|
0
|
0
|
|
} |
23
|
0
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
my ($self) = @_; |
25
|
0
|
|
|
|
|
|
my $el = $self->dom->at("div[itemprop=articleBody]"); |
26
|
|
|
|
|
|
|
$el->children("p.appE1121")->map('remove'); |
27
|
|
|
|
|
|
|
return html2text( $el->to_string ); |
28
|
|
|
|
|
|
|
} |
29
|
0
|
|
|
0
|
0
|
|
|
30
|
0
|
|
|
|
|
|
1; |