line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
use utf8; |
2
|
1
|
|
|
1
|
|
7
|
use Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
3
|
1
|
|
|
1
|
|
27
|
extends 'NewsExtractor::SiteSpecificExtractor'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use Importer 'NewsExtractor::TextUtil' => 'normalize_whitespace'; |
6
|
1
|
|
|
1
|
|
288
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
7
|
|
|
|
|
|
|
my ($self) = @_; |
8
|
|
|
|
|
|
|
return $self->tx->res->dom; |
9
|
0
|
|
|
0
|
0
|
|
} |
10
|
0
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my ($self) = @_; |
12
|
|
|
|
|
|
|
my $el = $self->dom->find('meta[property="og:title"]')->first; |
13
|
|
|
|
|
|
|
return $el->attr('content'); |
14
|
0
|
|
|
0
|
0
|
|
} |
15
|
0
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
my ($self) = @_; |
17
|
|
|
|
|
|
|
my $el = $self->dom->find('h2.newsTitle ~ div.desc > div:nth-child(1) > span:nth-child(1)')->first; |
18
|
|
|
|
|
|
|
return $el->text(); |
19
|
|
|
|
|
|
|
} |
20
|
0
|
|
|
0
|
0
|
|
|
21
|
0
|
|
|
|
|
|
my ($self) = @_; |
22
|
0
|
|
|
|
|
|
my $el = $self->dom->find('meta[property="og:description"]')->first; |
23
|
|
|
|
|
|
|
return normalize_whitespace( $el->attr('content') ); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
27
|
0
|
|
|
|
|
|
my ($txt) = $self->content_text =~ m/\A【(本報記者.+?報導)】/; |
28
|
0
|
|
|
|
|
|
return $txt; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |