| 1 | package WWW::GoKGS::Scraper::Top100; | ||
| 2 | 15 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 15 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 15 | ▶ | use parent qw/WWW::GoKGS::Scraper/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 15 | ▶ | use WWW::GoKGS::Scraper::Declare; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 16 | ▶ | sub base_uri { 'http://www.gokgs.com/top100.jsp' } |
|
Subroutine
base_uri: called CC=1 SCAR=0.0
Pod
documented
| |||
| 8 | |||
| 9 | 1 | ▶ | sub __build_scraper { |
|
Subroutine
__build_scraper: called CC=1 SCAR=2.6
| |||
| 10 | 1 | my $self = shift; | |
| 11 | |||
| 12 | 0 | ▶ | scraper { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 13 | process '//table[@class="grid"]//following-sibling::tr', | ||
| 14 | 0 | ▶ | 'players[]' => scraper { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 15 | 0 | process '//td[1]', 'position' => 'TEXT'; | |
| 16 | 0 | process '//td[2]/a', 'name' => 'TEXT', | |
| 17 | 'uri' => '@href'; | ||
| 18 | 0 | process '//td[3]', 'rank' => 'TEXT'; }; | |
| 19 | 1 | }; | |
| 20 | } | ||
| 21 | |||
| 22 | 15 | 1; | |
| 23 | |||
| 24 | __END__ | ||