line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
use utf8; |
2
|
1
|
|
|
1
|
|
6
|
use Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
3
|
1
|
|
|
1
|
|
26
|
extends 'NewsExtractor::SiteSpecificExtractor'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use Importer 'NewsExtractor::TextUtil' => ('html2text', 'normalize_whitespace', 'reformat_dateline'); |
6
|
1
|
|
|
1
|
|
281
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
7
|
|
|
|
|
|
|
my ($self) = @_; |
8
|
|
|
|
|
|
|
my $el = $self->dom->at('meta[property="og:title"]'); |
9
|
0
|
|
|
0
|
0
|
|
return normalize_whitespace( $el->attr("content") ); |
10
|
0
|
|
|
|
|
|
} |
11
|
0
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my ($self) = @_; |
13
|
|
|
|
|
|
|
my $el = $self->dom->at('.date'); |
14
|
|
|
|
|
|
|
my $txt = normalize_whitespace( $el->all_text ); |
15
|
0
|
|
|
0
|
0
|
|
$txt =~ s/^時間://; |
16
|
0
|
|
|
|
|
|
return reformat_dateline($txt, '+08:00'); |
17
|
0
|
|
|
|
|
|
} |
18
|
0
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
|
my ($self) = @_; |
20
|
|
|
|
|
|
|
my $el = $self->dom->at('li.source:nth-child(3)'); |
21
|
|
|
|
|
|
|
return $el->all_text; |
22
|
|
|
|
|
|
|
} |
23
|
0
|
|
|
0
|
0
|
|
|
24
|
0
|
|
|
|
|
|
my ($self) = @_; |
25
|
0
|
|
|
|
|
|
my $el = $self->dom->at('.news-detail-box > article:nth-child(4)'); |
26
|
|
|
|
|
|
|
return html2text( $el->to_string ); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
0
|
|
1; |