line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
use utf8; |
2
|
1
|
|
|
1
|
|
6
|
use Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
3
|
1
|
|
|
1
|
|
25
|
extends 'NewsExtractor::GenericExtractor'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use Importer 'NewsExtractor::TextUtil' => qw(u reformat_dateline); |
6
|
1
|
|
|
1
|
|
269
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
7
|
|
|
|
|
|
|
my ($self) = @_; |
8
|
|
|
|
|
|
|
my $el = $self->dom->at("li.date.time") or return; |
9
|
0
|
|
|
0
|
0
|
|
my $t = $el->all_text; |
10
|
0
|
0
|
|
|
|
|
reformat_dateline( $t, '+08:00' ); |
11
|
0
|
|
|
|
|
|
} |
12
|
0
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my ($self) = @_; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
my $x; |
16
|
0
|
|
|
0
|
0
|
|
my $t = $self->content_text; |
17
|
|
|
|
|
|
|
my @regexps = ( |
18
|
0
|
|
|
|
|
|
qr{(記者\s*([^/]+?)\s*/.+?報導)}, |
19
|
0
|
|
|
|
|
|
qr{(責任編輯/\p{Letter}+)\z}, |
20
|
0
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
for my $re (@regexps) { |
23
|
|
|
|
|
|
|
($x) = $t =~ /$re/; |
24
|
|
|
|
|
|
|
last if $x; |
25
|
0
|
|
|
|
|
|
} |
26
|
0
|
|
|
|
|
|
|
27
|
0
|
0
|
|
|
|
|
return $x; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
1; |