line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package NewsExtractor::SiteSpecificExtractor::hk_on_cc; |
2
|
1
|
|
|
1
|
|
8
|
use utf8; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
6
|
|
3
|
1
|
|
|
1
|
|
35
|
use Moo; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
26
|
|
4
|
|
|
|
|
|
|
extends 'NewsExtractor::GenericExtractor'; |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
324
|
use Importer 'NewsExtractor::TextUtil' => qw(u normalize_whitespace); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
15
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub dateline { |
9
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
10
|
0
|
0
|
|
|
|
|
my $el = $self->dom->at('div.toolBar > span.datetime') or return; |
11
|
|
|
|
|
|
|
|
12
|
0
|
|
|
|
|
|
my @t = split /[^0-9]+/, normalize_whitespace($el->all_text); |
13
|
0
|
|
|
|
|
|
return u( |
14
|
|
|
|
|
|
|
sprintf( |
15
|
|
|
|
|
|
|
'%04d-%02d-%02dT%02d:%02d:%02d+08:00', |
16
|
|
|
|
|
|
|
$t[0], $t[1], $t[2], $t[3], $t[4], |
17
|
|
|
|
|
|
|
0 |
18
|
|
|
|
|
|
|
) |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |