« NewsExtractor/SiteSpecificExtractor/new_ctv_com_tw.pm
↑ Summary
NewsExtractor/SiteSpecificExtractor/news_tnn_tw.pm »
| 1 | package NewsExtractor::SiteSpecificExtractor::www_penghutimes_com; | ||
| 2 | 1 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 1 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | extends 'NewsExtractor::GenericExtractor'; | |
| 5 | |||
| 6 | 1 | ▶ | use Importer 'NewsExtractor::TextUtil' => 'reformat_dateline'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 0 | ▶ | sub journalist { |
|
Subroutine
journalist: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 9 | 0 | my ($self) = @_; | |
| 10 | 0 | my $el = $self->dom->at('h1.main-title')->next(); | |
| 11 | 0 | my ($t) = $el->all_text() =~ m/記者:\s*(\S+)\s*/; | |
| 12 | 0 | return $t; | |
| 13 | } | ||
| 14 | |||
| 15 | 0 | ▶ | sub dateline { |
|
Subroutine
dateline: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 16 | 0 | my ($self) = @_; | |
| 17 | 0 | my $node = $self->dom->at('h1.main-title')->next()->child_nodes->first; | |
| 18 | 0 | my $t = reformat_dateline("$node", '+08:00'); | |
| 19 | 0 | return $t; | |
| 20 | } | ||
| 21 | |||
| 22 | 1 | 1; | |