line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::GoKGS::Scraper::Top100; |
2
|
9
|
|
|
9
|
|
1763
|
use strict; |
|
9
|
|
|
|
|
17
|
|
|
9
|
|
|
|
|
341
|
|
3
|
9
|
|
|
9
|
|
48
|
use warnings; |
|
9
|
|
|
|
|
18
|
|
|
9
|
|
|
|
|
264
|
|
4
|
9
|
|
|
9
|
|
49
|
use parent qw/WWW::GoKGS::Scraper/; |
|
9
|
|
|
|
|
16
|
|
|
9
|
|
|
|
|
59
|
|
5
|
9
|
|
|
9
|
|
588
|
use WWW::GoKGS::Scraper::Declare; |
|
9
|
|
|
|
|
18
|
|
|
9
|
|
|
|
|
68
|
|
6
|
|
|
|
|
|
|
|
7
|
10
|
|
|
10
|
1
|
50
|
sub base_uri { 'http://www.gokgs.com/top100.jsp' } |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub __build_scraper { |
10
|
1
|
|
|
1
|
|
2
|
my $self = shift; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
scraper { |
13
|
|
|
|
|
|
|
process '//table[@class="grid"]//following-sibling::tr', |
14
|
|
|
|
|
|
|
'players[]' => scraper { |
15
|
0
|
|
|
|
|
|
process '//td[1]', 'position' => 'TEXT'; |
16
|
0
|
|
|
|
|
|
process '//td[2]/a', 'name' => 'TEXT', |
17
|
|
|
|
|
|
|
'uri' => '@href'; |
18
|
0
|
|
|
0
|
|
|
process '//td[3]', 'rank' => 'TEXT'; }; |
|
0
|
|
|
|
|
|
|
19
|
1
|
|
|
|
|
6
|
}; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
__END__ |