line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
use utf8; |
2
|
1
|
|
|
1
|
|
6
|
use Moo; |
|
1
|
|
|
|
|
47
|
|
|
1
|
|
|
|
|
15
|
|
3
|
1
|
|
|
1
|
|
29
|
extends 'NewsExtractor::GenericExtractor'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use Importer 'NewsExtractor::TextUtil' => qw( normalize_whitespace ); |
6
|
1
|
|
|
1
|
|
270
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
7
|
|
|
|
|
|
|
my ($self) = @_; |
8
|
|
|
|
|
|
|
my $el = $self->dom->at("div.contents_page h1.title_"); |
9
|
0
|
|
|
0
|
0
|
|
return $el->text; |
10
|
0
|
|
|
|
|
|
} |
11
|
0
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my ($self) = @_; |
13
|
|
|
|
|
|
|
my $el = $self->dom->at(".date"); |
14
|
|
|
|
|
|
|
return $el->text; |
15
|
0
|
|
|
0
|
0
|
|
} |
16
|
0
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
|
my ($self) = @_; |
18
|
|
|
|
|
|
|
my $text = $self->content_text; |
19
|
|
|
|
|
|
|
my ($name) = $text =~ m{\b (?:\V+[╱/])? 記者(.+?) [//]? 報導\b}x; |
20
|
|
|
|
|
|
|
return $name; |
21
|
0
|
|
|
0
|
0
|
|
} |
22
|
0
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
my ($self) = @_; |
24
|
0
|
|
|
|
|
|
my $el = $self->dom->at(".edit > section"); |
25
|
|
|
|
|
|
|
my $text = $el->all_text; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $headline = $self->headline; |
28
|
0
|
|
|
0
|
0
|
|
$text =~ s/\A\s+$headline\s+//s; |
29
|
0
|
|
|
|
|
|
$text = normalize_whitespace($text); |
30
|
0
|
|
|
|
|
|
return $text; |
31
|
|
|
|
|
|
|
} |
32
|
0
|
|
|
|
|
|
|
33
|
0
|
|
|
|
|
|
1; |