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::GenericExtractor'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use Importer 'NewsExtractor::TextUtil' => 'normalize_whitespace', 'u'; |
6
|
1
|
|
|
1
|
|
258
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
7
|
|
|
|
|
|
|
use POSIX qw(strftime); |
8
|
1
|
|
|
1
|
|
29
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
9
|
|
|
|
|
|
|
my $self = $_[0]; |
10
|
|
|
|
|
|
|
my $ret; |
11
|
0
|
|
|
0
|
0
|
|
if (my $el = $self->dom->at('div.story-body > div.byline > span.byline__name')) { |
12
|
0
|
|
|
|
|
|
$ret = $el->text; |
13
|
0
|
0
|
|
|
|
|
} |
14
|
0
|
|
|
|
|
|
return $ret; |
15
|
|
|
|
|
|
|
} |
16
|
0
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my $self = $_[0]; |
18
|
|
|
|
|
|
|
my $dateline; |
19
|
|
|
|
|
|
|
if (my $el = $self->dom->at('div.date[data-seconds]')) { |
20
|
0
|
|
|
0
|
0
|
|
my $epoch = $el->attr("data-seconds"); |
21
|
0
|
|
|
|
|
|
$dateline = u(strftime(q(%Y-%m-%dT%H:%M:%S+08:00), gmtime($epoch))); |
22
|
0
|
0
|
|
|
|
|
} |
23
|
0
|
|
|
|
|
|
return $dateline; |
24
|
0
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
|
|
|
1; |