« NewsExtractor/SiteSpecificExtractor/www_ntdtv_com.pm
↑ Summary
NewsExtractor/SiteSpecificExtractor/www_ttv_com_tw.pm »
| 1 | package NewsExtractor::SiteSpecificExtractor::m_news_cctv_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' => qw(normalize_whitespace reformat_dateline); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 0 | ▶ | sub dateline { | ||||||||
|
Subroutine
dateline: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 9 | 0 | my ($self) = @_; | |||||||||
| 10 | 0 | ▶ | my $el = $self->dom->at('span.info i') or return; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 11 | 0 | return reformat_dateline( $el->all_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() =~ m/( (?:总台记者|编辑) (.+?))\z/xg; | |||||||||
| 17 | 0 | $txt = normalize_whitespace($txt); | |||||||||
| 18 | 0 | return $txt; | |||||||||
| 19 | } | ||||||||||
| 20 | |||||||||||
| 21 | 1 | 1; | |||||||||