NAME
WWW::Netflix - Get and set ratings and queue for any Netflix account. (This module used to be called Net::Netflix.)
DESCRIPTION
The included netlix_mover
script does the work of retrieving ratings and queued movies from one account or saving them to another account. You will probably just want to use it.
This module is designed to pull down every movie you've ever rated using your Netflix account, or a list of the movies in your queue. It can also be used to set the ratings or the queue on another account. It would be a good idea to use this if you were looking to transfer your ratings or your queue to another Netflix account.
Currently does not work for "Not Interested" ratings. It would also be nice to have methods to clear ratings and to remove a movie from the queue.
SYNOPSIS
use WWW::Netflix;
use Data::Dumper;
# log into a Netflix account
my $old_netflix = WWW::Netflix->new();
$old_netflix->login( 'USERNAME', 'PASSWORD' );
# get ratings from the old Netflix account and print them
my $ratings = $old_netflix->getRatings();
print Dumper( $ratings );
# get queue from the old Netflix account and print it
my $queue = $old_netflix->getQueue();
print Dumper( $queue );
# log into a new Netflix account
my $new_netflix = WWW::Netflix->new();
$new_netflix->login( 'USERNAME', 'PASSWORD' );
# copy all ratings from the old account to the new one
foreach my $movie ( keys %$ratings ) {
$new_netflix->setRating( $movie, $old_netflix->getRating( $movie ) );
}
# copy queue from the old account to the new one
foreach my $movie ( @{ $queue->{ queued } },
@{ $queue->{ saved } } ) {
my ( $id, $title ) = @$movie;
$new_netflix->queueMovie( $id );
}
- new
-
my $netflix = WWW::Netflix->new();
Instantiates an object with which to perform further requests.
- login
-
$netflix->login( $username, $password );
Login is required in order to retreive the ratings and queue.
- getRatings
-
$netflix->getRatings();
Returns a reference to a hashref of all rated Netflix movies for the account. It may take a little while, as it has to scrape quite a few pages in order to acheive the final result.
{ '1007395' => { 'title' => 'A_Streetcar_Named_Desire', 'rating' => '4' }, # ... };
- getQueue
-
$netflix->getQueue();
Retrieves a reference to a hashref of all movies in the queue for the Netflix account. It may take a while to gather all of the movies in the queue.
{ queued => [ [ 12345, 'A neat movie' ], # ... ], saved => [ [ 666789, 'A Movie That Netflix Might Stock Someday' ] # ... ] home => [ [ 987765, 'Best Movie Ever' ] # ... ] }
- setRating
-
$netflix->setRating( $movie_id, $rating );
Sets a rating for a particular movie.
- queueMovie
-
$netflix->queueMovie( $movie_id );
Puts a particular movie in the queue.
- getRating
-
$netflix->getRating( $movie_id );
Gets a rating for a particular movie.
- getTitle
-
$netflix->getTitle( $movie_id );
Gets a title for a particular movie.
AUTHORS
Colin Meyer and Christie Robertson <pants@helvella.org>
WWW-Netflix 0.05 is based on Net-Netflix 0.03 by John Resig.
DISCLAIMER
This application utilitizes screen-scraping techniques, which are very fickle and susceptable to changes.
COPYRIGHT
Copyright 2008 Christie Robertson and Colin Meyer. Copyright 2005 John Resig
LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See <http://www.perl.com/perl/misc/Artistic.html>
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.