| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package WWW::Mixi::Scraper::Plugin::NewBBS; | 
| 2 |  |  |  |  |  |  |  | 
| 3 | 1 |  |  | 1 |  | 961 | use strict; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 30 |  | 
| 4 | 1 |  |  | 1 |  | 4 | use warnings; | 
|  | 1 |  |  |  |  | 1 |  | 
|  | 1 |  |  |  |  | 24 |  | 
| 5 | 1 |  |  | 1 |  | 4 | use WWW::Mixi::Scraper::Plugin; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 17 |  | 
| 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 'div.newBbsArea>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__ |