root/trunk/plagger/assets/plugins/Filter-FindEnclosures/typepad_images.pl

Revision 898 (checked in by miyagawa, 3 years ago)

add TypePad? shared image finder. Fixes #276

Line 
1 sub handle {
2     my ($self, $url) = @_;
3     $url =~ qr!/\.shared/image\.html\?/photos/uncategorized/!;
4 }
5
6 sub find {
7     my($self, $args) = @_;
8
9     my $url = URI->new($args->{url});
10     if ($url->query) {
11         my $img = URI->new;
12         $img->scheme($url->scheme);
13         $img->host($url->host);
14         $img->path($url->query);
15
16         my $enclosure = Plagger::Enclosure->new;
17         $enclosure->url($img);
18         $enclosure->auto_set_type;
19
20         return $enclosure;
21     }
22
23     return;
24 }
Note: See TracBrowser for help on using the browser.