my $link = $tr->at('td:nth-child(1) a');
WWW::EZTV::Show->new(
title => $link->all_text,
- url => $self->url->clone->path($link->attrs('href')),
+ url => $self->url->clone->path($link->attr('href')),
status => lc($tr->at('td:nth-child(2)')->all_text),
rating => $tr->at('td:nth-child(3)')->all_text
);
=head1 SYNOPSIS
-First create a WWW::EZTV object to navigate.
-
use WWW::EZTV;
+ use v5.10;
my $eztv = WWW::EZTV->new;
+ # Find one show
my $show = $eztv->find_show(sub{ $_->name =~ /Walking dead/i });
+ # Find one episode
my $episode = $show->find_episode(sub{
$_->season == 3 &&
$_->number == 8 &&
$_->quality eq 'standard'
});
+ # Get first torrent url for this episode
+ say $episode->find_link(sub{ $_->type eq 'torrent' })->url;
+
=attr url
EZTV URL.