]>
iEval git - www-offliberty.git/blob - lib/WWW/Offliberty.pm
f770208c40fab40c79af17d1eb7ac9b1163a402c
1 package WWW
::Offliberty
;
6 use parent qw
/Exporter/;
7 our $VERSION = '0.001';
8 our @EXPORT_OK = qw
/off/;
10 use HTML
::TreeBuilder
;
13 my $ua = LWP
::UserAgent
->new;
16 my ($url, @params) = @_;
17 my $content = $ua->post("http://offliberty.com/off.php", {track
=> $url, @params})->decoded_content;
18 my $root = HTML
::TreeBuilder
->new_from_content($content);
19 map { $_->attr('href') } $root->look_down(qw
/_tag a class download/);
27 WWW::Offliberty - interface to offliberty.com download service
31 use WWW::Offliberty qw/off/;
32 my @links = off 'http://youtube.com/watch?v=something', video_file => 1;
36 WWW::Offliberty is a simple interface to the offliberty.com download service.
38 It exports a single function: B<off>(I<url>, [I<argument> => value...]).
39 This function that returns a list of download links,
40 as returned by the service.
44 L<http://offliberty.com>
48 Marius Gavrilescu, E<lt>marius@ieval.roE<gt>
50 =head1 COPYRIGHT AND LICENSE
52 Copyright (C) 2013 by Marius Gavrilescu
54 This library is free software; you can redistribute it and/or modify
55 it under the same terms as Perl itself, either Perl version 5.18.1 or,
56 at your option, any later version of Perl 5 you may have available.
This page took 0.04318 seconds and 4 git commands to generate.