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::SiteSpecificExtractor'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use Importer 'NewsExtractor::TextUtil' => qw( reformat_dateline html2text ); |
6
|
1
|
|
|
1
|
|
291
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
7
|
|
|
|
|
|
|
my ($self) = @_; |
8
|
|
|
|
|
|
|
return $self->dom->at('h3.newsTitle')->text; |
9
|
0
|
|
|
0
|
0
|
|
} |
10
|
0
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my ($self) = @_; |
12
|
|
|
|
|
|
|
my $el = $self->dom->at('div.newsMsg') or return; |
13
|
|
|
|
|
|
|
return html2text( $el->to_string ); |
14
|
0
|
|
|
0
|
0
|
|
} |
15
|
0
|
0
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
my ($self) = @_; |
17
|
|
|
|
|
|
|
return reformat_dateline( $self->dom->at('div.newsInfo')->all_text(), '+08:00' ); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
21
|
0
|
|
|
|
|
|
my ($x) = $self->dom->at('div.newsInfo')->all_text =~ m{^記者(.+)/\S+報導-}; |
22
|
|
|
|
|
|
|
return $x; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
0
|
|
1; |