1 package WWW
::Offliberty
;
6 use parent qw
/Exporter/;
7 our $VERSION = '0.002';
8 our @EXPORT_OK = qw
/off/;
10 use constant OFF_URL
=> 'http://offliberty.com/off54.php';
12 use HTML
::TreeBuilder
;
15 my $http = HTTP
::Tiny
->new(agent
=> "WWW-Offliberty/$VERSION ");
18 my ($url, @params) = @_;
19 my $ret = $http->post_form(OFF_URL
, {track
=> $url, @params});
20 die $ret->{reason
} unless $ret->{success
};
21 my $root = HTML
::TreeBuilder
->new_from_content($ret->{content
});
22 map { $_->attr('href') } $root->look_down(qw
/_tag a class download/);
30 WWW::Offliberty - interface to offliberty.com download service
34 use WWW::Offliberty qw/off/;
35 my @links = off 'http://youtube.com/watch?v=something', video_file => 1;
39 WWW::Offliberty is a simple interface to the offliberty.com download service.
41 It exports a single function: B<off>(I<url>, [I<argument> => value...]).
42 This function that returns a list of download links,
43 as returned by the service.
47 L<http://offliberty.com>
51 Marius Gavrilescu, E<lt>marius@ieval.roE<gt>
53 =head1 COPYRIGHT AND LICENSE
55 Copyright (C) 2013 by Marius Gavrilescu
57 This library is free software; you can redistribute it and/or modify
58 it under the same terms as Perl itself, either Perl version 5.18.1 or,
59 at your option, any later version of Perl 5 you may have available.
This page took 0.023351 seconds and 4 git commands to generate.