« NewsExtractor/SiteSpecificExtractor/m_news_cctv_com.pm
↑ Summary
NewsExtractor/SiteSpecificExtractor/www_nownews_com.pm »
| 1 | package NewsExtractor::SiteSpecificExtractor::www_ttv_com_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' => 'u'; | ||||||||
|
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(".ReportDate > a:nth-child(1)") or return; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 11 | 0 | my ($yyyy, $mm, $dd) = split /-/, $el->all_text; | |||||||||
| 12 | 0 | return u(sprintf('%04d/%02d/%02d', $yyyy, $mm, $dd)); | |||||||||
| 13 | } | ||||||||||
| 14 | |||||||||||
| 15 | 0 | ▶ | sub journalist { | ||||||||
|
Subroutine
journalist: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 16 | 0 | my ($self) = @_; | |||||||||
| 17 | 0 | my ($name) = $self->content_text =~ m{(記者\s*([^/]+?)\s*/.+?報導)}; | |||||||||
| 18 | 0 | return $name; | |||||||||
| 19 | } | ||||||||||
| 20 | |||||||||||
| 21 | 1 | 1; | |||||||||