WWW::Odeon

A simple API for screen-scraping the www.odeon.co.uk website
Download

WWW::Odeon Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Iain Tatch
  • Publisher web site:
  • http://search.cpan.org/~iaint/

WWW::Odeon Tags


WWW::Odeon Description

A simple API for screen-scraping the www.odeon.co.uk website WWW::Odeon is a Perl module that allows data about films showing at Odeon cinemas in the United Kingdom to be retrieved. The only prerequisite is LWP::Simple -- and a connection to the web!To fully use this module it is necessary to understand the hierarchy by which Odeon UK structures its film information. The country is divided into regions, each region contains multiple cinemas, each cinema shows several films, at various times, for several days. This structure is represented in the module API.SYNOPSIS # Procedural interface use WWW::Odeon; my @regions = get_regions(); my @cinemas = get_cinemas( $regions ); my $details = get_details( $cinemas ); my @dates = keys %$details; foreach my $day ( @dates ) { my @films = keys %{ $details->{$day} }; foreach my $film ( @films ) { while ( my ( $showing, $availability ) = each %{ $details->{$day}->{$film} } ) { print "Film '$film' is $availability at $showing on $day "; } } } # Object-oriented interface use WWW::Odeon (); my $odeon = new WWW::Odeon; $odeon->cache_time( 30 ); my $regions = $odeon->regions; my $cinemas = $odeon->cinemas( $regions-> ); my $details = $odeon->details( $cinemas-> ); # Or directly access film data if you know the cinema name print "The following films are on at Odeon Leicester Square: "; print join( " ", $odeon->films('Leicester Square') ); print "There is information about the following dates for Odeon York: "; print join( " ", $odeon->dates('York') ) @showtimes = $odeon->availability( $cinema, $film, $day ); Requirements: · Perl


WWW::Odeon Related Software