NAME

WWW::Search::Torrentz::Result - a result of a WWW::Search::Torrentz search

SYNOPSIS

my $result = $search->next_result;
say 'URL: ' . $result->url;
say 'Title: ' . $result->title;
say 'Infohash: ' . $result->infohash;
say 'Verified: ' . $result->verified;
say 'Age: ' . $result->age;
say 'Size: ' . $result->size;
say 'Seeders: ' . $result->seeders;
say 'Leechers: ' . $result->leechers;
say 'Magnet link: ' . $result->magnet;
say 'Magnet link with trackers: ' . $result->magnet(1);
my @tracker_list = $result->trackers;
my @file_list = $result->files;
my $torrent_file = $result->torrent;

DESCRIPTION

WWW::Search::Torrentz::Result is the result of a WWW::Search::Torrentz search.

Useful methods:

url

Returns a link to the torrent details page.

title

Returns the torrent's title.

infohash

Returns the infohash of the torrent, a 40 character hex string.

verified

Returns the verification level of this torrent, or 0 if the torrent not verified. Higher is better.

age

Returns the torrent's age, as returned by Torrentz. Usually a string such as '4 days', 'yesterday', 'today', '2 months'.

size

Returns the torrent's size, as returned by Torrentz. A string such as '151 MB', '25 GB'.

seeders

Returns the number of seeders this torrent has, as returned by Torrentz.

leechers

Returns the number of leechers this torrent has, as returned by Torrentz.

magnet([include_trackers])

Returns a magnet link that describes this torrent.

If include_trackers is true, the magnet link will include the tracker list. This calls parse_page if not called already.

trackers

Returns a list of trackers for this torrent. Calls parse_page if not called already.

files

Returns a list of files this torrent includes. Calls parse_page if not called already.

Each element is a hashref with two keys. path is the file path and size is the file size, as returned by Torrentz.

parse_page

Downloads the details page for this torrent and extracts the tracker and file list. It is called automatically by other methods when necessary, you shouldn't have to call it yourself.

torrent

Downloads this torrent file from Torrage. If found, it returns the contents of the torrent file. Otherwise it returns undef.

SEE ALSO

AUTHOR

Marius Gavrilescu, <marius@ieval.ro>

COPYRIGHT AND LICENSE

Copyright (C) 2013 by Marius Gavrilescu

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.18.1 or, at your option, any later version of Perl 5 you may have available.