| 1 | package WWW::PDAScraper::Slate; | ||
| 2 | |||
| 3 | # PDAScraper.pm rules for scraping the | ||
| 4 | # Slate website | ||
| 5 | |||
| 6 | sub config { | ||
| 7 | return { | ||
| 8 | name => 'Slate', | ||
| 9 | start_from => | ||
| 10 | 'http://www.slate.com/id/2065896/view/2057069/', | ||
| 11 | url_regex => [ | ||
| 12 | '/id/(\d+)/', | ||
| 13 | sub { \ "/toolbar.aspx?action=print&id=$1" } | ||
| 14 | ], | ||
| 15 | chunk_regex => | ||
| 16 | qr{</p></td></tr></table>(.*?)<img[^>]+SlateonNPR.gif} | ||
| 17 | }; | ||
| 18 | } | ||
| 19 | |||
| 20 | 1; | ||
| 21 |