| 1 | #! perl | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | package Comics::Plugin::HaraKiri; | ||
| 7 | |||
| 8 | use parent qw(Comics::Fetcher::Cascade); | ||
| 9 | |||
| 10 | our $VERSION = "0.01"; | ||
| 11 | our $disabled = 1; # deceased | ||
| 12 | |||
| 13 | sub register { | ||
| 14 | shift->SUPER::register | ||
| 15 | ( { name => "Hara Kiri", | ||
| 16 | url => "http://www.lectrr.be/nl/", | ||
| 17 | pats => | ||
| 18 | [ | ||
| 19 | qr{ <h2>Recentste \s Hara \s Kiwi-toon</h2> \s* | ||
| 20 | <ul \s+ class="toonlink"> \s* | ||
| 21 | <li> \s* | ||
| 22 | <a \s+ | ||
| 23 | href="(?<url>/nl/cartoon/.*?)"> | ||
| 24 | (?<title>.*?)</a> \s* | ||
| 25 | </li> | ||
| 26 | }six, | ||
| 27 | qr{ <article \s+ | ||
| 28 | id="cartoon" \s+ | ||
| 29 | class="bigcartoon"> \s* | ||
| 30 | <img \s+ | ||
| 31 | src="(?<url>/files/attachments/.*?/(?<image>.*?\.\w+))" \s+ | ||
| 32 | title="(?<title>.*?)" | ||
| 33 | }six, | ||
| 34 | ], | ||
| 35 | } ); | ||
| 36 | } | ||
| 37 | |||
| 38 | # Important: Return the package name! | ||
| 39 | __PACKAGE__; |