Scraper/Plugin/ListComment.pm

filter: Statementstmt 50.0% 11 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 3 / 6 Podpod 100% 1 / 1 totaltotal 51.7% 15 / 29 CC 1 SCAR 4.1
CC
1
Cov
50%
scrape
2.0
__ANON__
2.0
__ANON__
2.0
CRAP 1.5
« Scraper/Plugin/ViewDiary.pm ↑ Summary Scraper/Plugin/NewBBS.pm »
1 package WWW::Mixi::Scraper::Plugin::ListComment;
2
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use WWW::Mixi::Scraper::Plugin;
Subroutine BEGIN: called CC=1 SCAR=0.0
6
7 1 validator {qw( id is_number )};
8
9 0 ▶sub scrape {
Subroutine scrape: not called CC=1 SCAR=6.9
Pod documented
10 0 my ($self, $html) = @_;
11
12 0 my %scraper;
13 0 ▶ $scraper{comments} = scraper {
Subroutine __ANON__: not called CC=1 SCAR=6.9
14 0 process 'dl>dd',
15 string => 'TEXT';
16 0 process 'dl>dd>a',
17 link => '@href',
18 subject => 'TEXT';
19 0 process 'dl>dt',
20 time => 'TEXT';
21 0 result qw( string time link subject );
22 0 };
23
24 0 ▶ $scraper{list} = scraper {
Subroutine __ANON__: not called CC=1 SCAR=6.9
25 process 'div.listCommentArea>ul.entryList01>li',
26 0 'comments[]' => $scraper{comments};
27 0 result qw( comments );
28 0 };
29
30 return $self->post_process(
31 0 $scraper{list}->scrape(\$html) => \&_extract_name
32 );
33 }
34
35 1 1;
36
37 __END__
« Scraper/Plugin/ViewDiary.pm ↑ Summary Scraper/Plugin/NewBBS.pm »