Branch Coverage

blib/lib/NewsExtractor/GenericExtractor.pm
Criterion Covered Total %
branch 0 84 0.0


line true false branch
24 0 0 if ($el = $dom->at('#story #news_title, #news_are .newsin_title, .data_midlle_news_box01 dl td:first-child')) { }
0 0 elsif ($el = $dom->at(q[meta[property='og:title']])) { }
0 0 elsif ($el = $dom->at(q[meta[name='title']])) { }
0 0 elsif ($el = $dom->at('title')) { }
37 0 0 if (my $site_name = $self->site_name)
40 0 0 if (defined $title)
57 0 0 if ($guess = $dom->at(q[meta[property='article:modified_time'], meta[property='article:published_time'], meta[itemprop=dateModified][content], meta[itemprop=datePublished][content]])) { }
0 0 elsif ($guess = $dom->at('time[itemprop=datePublished][datetime], h1 time[datetime], .func_time time[pubdate], span.time > time.post-published')) { }
0 0 elsif ($guess = $dom->at('.reporter time, span.viewtime, header.article-desc time, .timeBox .updatetime span, .caption div.label-date, .contents_page span.date, .main-content span.date, .newsin_date, .news .date, .author .date, ul.info > li.date > span:nth-child(2), #newsHeadline span.datetime, article p.date, .post-meta > .icon-clock > span, .article_info_content span.info_time, .content time.page-date, .c_time, .newsContent p.time, div.title > div.time, div.article-meta div.article-date, address.authorInfor time, .entry-meta .date a, .author-links .posts-date, .top_title span.post_time, .node-inner > .submitted > span')) { }
0 0 elsif ($guess = $dom->at('div#articles cite')) { }
0 0 elsif ($guess = $dom->at('article.ndArticle_leftColumn div.ndArticle_creat, ul.info li.date, .cpInfo .cp, .nsa3 .tt27')) { }
0 0 elsif ($guess = $dom->at('.news-toolbar .news-toolbar__cell')) { }
0 0 elsif ($guess = $dom->at('.content .writer span:nth-child(2)')) { }
0 0 elsif ($guess = $dom->at('div.content-wrapper-right > div > div > div:nth-child(4)')) { }
0 0 elsif ($guess = $dom->at('span#ctl00_ContentPlaceHolder1_News_Label, #ctl00_ContentPlaceHolder1_UpdatePanel2 font[color=darkred]')) { }
0 0 elsif ($guess = $dom->at('.news-info dd.date:nth-child(6)')) { }
0 0 elsif ($guess = $dom->at('article.entry-content div:nth-child(2)')) { }
0 0 elsif ($guess = $dom->at('span.submitted-by')) { }
0 0 elsif ($guess = $dom->at('#story #news_author')) { }
0 0 elsif ($guess = $dom->at('.data_midlle_news_box01 dl dd ul li:first-child')) { }
0 0 elsif ($guess = $dom->at('#details_block .left .date, .article_header > .author > span:last-child')) { }
0 0 elsif ($guess = $dom->at('.timebox > .publishtime,div.newsInfo > span.time')) { }
121 0 0 if ($dateline)
126 0 0 if ($dateline =~ /^([0-9]{4})[^0-9]/u)
127 0 0 if ($1 > (localtime)[5] + 1900)
142 0 0 if ($guess = $dom->at('meta[property="og:article:author"]')) { }
0 0 elsif ($guess = $dom->at('meta[name="author"]')) { }
0 0 elsif ($guess = $dom->at('.bt_xmic span[itemprop=author], div.tdb_single_author a.tdb-author-name, div.field-item a[href^=/author/], div.content_reporter a[itemprop=author], span[itemprop=author] a, div.author div.intro a div.name, div.article-author > h5 > a, div.article-meta > div.article-author > a, div.authorInfo li.authorName > a, .article .writer > p, .info_author, .news-info dd[itemprop=author], .content_reporter a, .top_title span.reporter_name, .post-heading time span, header .article-meta .article-author, .article_header > .author > span:first-child, .mid-news > .m-left-side > .maintype-wapper > .subtype-sort, .newsCon > .newsInfo > span:first-child, .newsdetail_content > .title > h4 > a[href^="/news/searchresult/news?search_text="], .m-from-author > .m-from-author__name, .post-author-name a[itemprop*=author], a.post-author-avatar .post-author-name > b, div#news_content div.author')) { }
0 0 elsif ($guess = $dom->at('div#yt_container_placeholder + p')) { }
0 0 elsif ($guess = $dom->at('h4.font_color5')) { }
0 0 elsif ($guess = $dom->at('#story #news_author')) { }
0 0 elsif ($guess = $dom->at('#details_block .left .name, .articleMain .article-author a.author-title, .article__credit a[href^="/author/"], span[itemprop=author] span[itemprop=name], .post-header-additional .post-meta-info a.nickname')) { }
0 0 elsif ($guess = $dom->at('div.single-post-meta a[rel="author"]')) { }
0 0 elsif ($guess = $dom->at('#PostContent .head-section-content p.meta')) { }
162 0 0 if $ret and &is_NewspaperName($ret)
164 0 0 if (not $ret and my $content_text = $self->content_text)
198 0 0 if $ret
201 0 0 unless ($ret)
203 0 0 if $_->type eq "text"
0 0 if ($guess and $dom->descendant_nodes->first(sub {
209 0 0 if ($ret)
211 0 0 if &is_NewspaperName($ret)