7 # ABSTRACT: EZTV scrapper
9 has url => ( is => 'ro', lazy => 1, default => sub { Mojo::URL->new('https://eztv.ch/') } );
10 has url_shows => ( is => 'ro', lazy => 1, default => sub { shift->url->clone->path('/showlist/') } );
15 builder => '_build_shows',
24 $self->get_response( $self->url_shows )->dom->find('table.header_brd tr[name="hover"]')->map(sub {
26 my $link = $tr->at('td:nth-child(2) a');
28 title => $link->all_text,
29 url => $self->url->clone->path($link->attr('href')),
30 status => lc($tr->at('td:nth-child(3)')->all_text),
31 rating => $tr->at('td:nth-child(4)')->text + 0
43 my $eztv = WWW::EZTV->new;
46 my $show = $eztv->find_show(sub{ $_->name =~ /Walking dead/i });
49 my $episode = $show->find_episode(sub{
52 $_->quality eq 'standard'
55 # Get first torrent url for this episode
56 say $episode->find_link(sub{ $_->type eq 'torrent' })->url;
72 L<Mojo::Collection> of L<WWW::EZTV::Show> objects.
78 How many shows exists.
84 Find first L<WWW::EZTV::Show> object matching the given criteria.
85 This method accept an anon function.
91 This is an early release, so probable there are plenty of bugs around.
92 If you found one, please report it on RT or at the github repo:
94 L<https://github.com/diegok/www-eztv>
96 Pull requests are also very welcomed, but please include tests demostrating