line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
use utf8; |
2
|
1
|
|
|
1
|
|
7
|
use Moo; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
3
|
1
|
|
|
1
|
|
29
|
extends 'NewsExtractor::GenericExtractor'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
my ($self) = @_; |
6
|
|
|
|
|
|
|
my $el = $self->dom->at("h1.page-title"); |
7
|
0
|
|
|
0
|
0
|
|
return $el->text; |
8
|
0
|
|
|
|
|
|
} |
9
|
0
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
my ($self) = @_; |
11
|
|
|
|
|
|
|
my $el = $self->dom->at("div.submitted > span"); |
12
|
|
|
|
|
|
|
my $dateline = $el->text; |
13
|
0
|
|
|
0
|
0
|
|
$dateline =~ s{\A ([0-9]{4})\.([0-9]{2})\.([0-9]{2}) \s+ ([0-9]{2}):([0-9]{2}) \z}{$1-$2-$3T$4:$5:00+08:00}x; |
14
|
0
|
|
|
|
|
|
return $dateline; |
15
|
0
|
|
|
|
|
|
} |
16
|
0
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
|
my ($self) = @_; |
18
|
|
|
|
|
|
|
my $el = $self->dom->at("div.user-infos > h3 > a"); |
19
|
|
|
|
|
|
|
return $el->text; |
20
|
|
|
|
|
|
|
} |
21
|
0
|
|
|
0
|
0
|
|
|
22
|
0
|
|
|
|
|
|
1; |