line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::Mixi::Scraper::Plugin::NewFriendDiary;
|
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
8
|
use strict;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
46
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
5
|
1
|
|
|
1
|
|
6
|
use WWW::Mixi::Scraper::Plugin;
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
6
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
validator {qw( page is_number )};
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub scrape {
|
10
|
0
|
|
|
0
|
1
|
|
my ($self, $html) = @_;
|
11
|
|
|
|
|
|
|
|
12
|
0
|
|
|
|
|
|
my %scraper;
|
13
|
|
|
|
|
|
|
$scraper{entries} = scraper {
|
14
|
0
|
|
|
0
|
|
|
process 'dl>dt',
|
15
|
|
|
|
|
|
|
time => 'TEXT';
|
16
|
0
|
|
|
|
|
|
process 'dl>dd>a',
|
17
|
|
|
|
|
|
|
subject => 'TEXT',
|
18
|
|
|
|
|
|
|
link => '@href';
|
19
|
0
|
|
|
|
|
|
process 'dl>dd',
|
20
|
|
|
|
|
|
|
string => 'TEXT';
|
21
|
0
|
|
|
|
|
|
result qw( string subject link time );
|
22
|
0
|
|
|
|
|
|
};
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
$scraper{list} = scraper {
|
25
|
0
|
|
|
0
|
|
|
process 'ul.entryList01>li',
|
26
|
|
|
|
|
|
|
'entries[]' => $scraper{entries};
|
27
|
0
|
|
|
|
|
|
result qw( entries );
|
28
|
0
|
|
|
|
|
|
};
|
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
return $self->post_process(
|
31
|
|
|
|
|
|
|
$scraper{list}->scrape(\$html) => \&_extract_name
|
32
|
|
|
|
|
|
|
);
|
33
|
|
|
|
|
|
|
}
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1;
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__
|