/ Published in: Perl
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Netlix perl script # Jared Evans -10/17/04 # http://jarednevans.livejournal.com # Parse Your Netflix Queue RSS output into a text file use strict; use XML::RSSLite; use LWP::Simple; use CGI; # create a CGI output my $cgi = new CGI; # Declare variables for URL to be parsed my $url2parse; # Setup argument to your Netflix RSS my $arg = "http://rss.netflix.com/QueueRSS?id=PXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; # Get the URL, assign it to url2parse, and then parse the RSS content $url2parse = get($arg); my %result; my $item; # Process the RSS and save it in easily accessible variables parseRSS(\%result, \$url2parse); # Generate a list of only the first 10 movies in the queue my $count = 0; my $max_count = 10; foreach $item (@{$result{'item'}}) { $count = $count + 1 ; }