]>
Commit | Line | Data |
---|---|---|
1 | package WWW::Search::Coveralia::Albums; | |
2 | ||
3 | use 5.014000; | |
4 | use strict; | |
5 | use warnings; | |
6 | use parent qw/WWW::Search::Coveralia/; | |
7 | ||
8 | our $VERSION = '0.000_001'; | |
9 | ||
10 | use WWW::Search::Coveralia::Result::Album; | |
11 | use constant DEFAULT_URL => 'http://www.coveralia.com/mostrar_discos.php'; | |
12 | ||
13 | sub process_result{ | |
14 | my ($self, $row) = @_; | |
15 | my $a = $row->find('a'); | |
16 | my ($title, $artist, $year) = map { $_->as_text } $row->find('td'); | |
17 | my $url = $self->absurl('', $a->attr('href')); | |
18 | WWW::Search::Coveralia::Result::Album->new($self, $url, $title, $artist, $year); | |
19 | } | |
20 | ||
21 | 1; | |
22 | __END__ | |
23 | ||
24 | =head1 NAME | |
25 | ||
26 | WWW::Search::Coveralia::Albums - search for albums on coveralia.com with WWW::Search | |
27 | ||
28 | =head1 SYNOPSIS | |
29 | ||
30 | use WWW::Search; | |
31 | my $search = WWW::Search->new('Coveralia::Albums'); | |
32 | $search->native_query('query'); | |
33 | # see WWW::Search documentation for details | |
34 | ||
35 | =head1 DESCRIPTION | |
36 | ||
37 | WWW::Search::Coveralia::Albums is a subclass of WWW::Search that searches for albums using the L<http://coveralia.com> cover art website. | |
38 | ||
39 | To use this module, read the L<WWW::Search> documentation. | |
40 | ||
41 | Search results are instances of the L<WWW::Search::Coveralia::Result::Album> Class. | |
42 | ||
43 | =head1 SEE ALSO | |
44 | ||
45 | L<http://coveralia.com>, L<WWW::Search>, L<WWW::Search::Coveralia::Artists> | |
46 | ||
47 | =head1 AUTHOR | |
48 | ||
49 | Marius Gavrilescu, E<lt>marius@ieval.roE<gt> | |
50 | ||
51 | =head1 COPYRIGHT AND LICENSE | |
52 | ||
53 | Copyright (C) 2014 by Marius Gavrilescu | |
54 | ||
55 | This library is free software; you can redistribute it and/or modify | |
56 | it under the same terms as Perl itself, either Perl version 5.18.2 or, | |
57 | at your option, any later version of Perl 5 you may have available. | |
58 | ||
59 | ||
60 | =cut |