« NewsExtractor/SiteSpecificExtractor/www_penghutimes_com.pm
↑ Summary
NewsExtractor/SiteSpecificExtractor/www_taipeitimes_com.pm »
| 1 | package NewsExtractor::SiteSpecificExtractor::news_tnn_tw; | ||
| 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 dateline { |
|
Subroutine
dateline: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 9 | 0 | my ($self) = @_; | |
| 10 | 0 | my $el = $self->dom->at("span.f12_15a_g2"); | |
| 11 | 0 | return reformat_dateline( $el->text(), '+08:00' ); | |
| 12 | } | ||
| 13 | |||
| 14 | 0 | ▶ | sub journalist { |
|
Subroutine
journalist: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 15 | 0 | my ($self) = @_; | |
| 16 | 0 | my $txt = $self->content_text; | |
| 17 | |||
| 18 | 0 | my ($x) = $txt =~ m{[〔﹝【]記者 \s* ([ \p{Letter}]+?) \s* (?:[//]\p{Letter}+)?報導[﹞〕】]}x; | |
| 19 | 0 | return $x; | |
| 20 | } | ||
| 21 | |||
| 22 | 1 | 1; | |