Claes Jakobsson > WWW-Search-Tv-Sweden-TvDotNu > WWW::Search::Tv::Sweden::TvDotNu

Download:
WWW-Search-Tv-Sweden-TvDotNu-1.01.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.01   Source  

NAME ^

WWW::Search::Tv::Sweden::TvDotNu - Perl extension for fetching television program from swedish site http://www.tv.nu

SYNOPSIS ^

  use WWW::Search::Tv::Sweden::TvDotNu;

  my $tv = WWW::Search::Tv::Sweden::TvDotNu->new();

  my $today = $tv->get_today();

  foreach my $entry ($today->for_channel('svt1')->entires) {
    print $entry->start_time, ": ", $entry->title, "\n";
    if($entry->title =~  /Kultur/) {
      $tv->get_full_entry($entry);
      print "\t", $entry->description, "\n"\n";
    }
  }

DESCRIPTION ^

The WWW::Search::Tv::Sweden::TvDotNu module provides an object-oriented API for retrival and searching of television table of contents from the swedish site http://www.tw.nu. The site provides todays and tomorrows program for the following channels. The abrivated name used internally by the module and which must (should) be used when searching the record set is written within ().

SVT 1 (svt1), SVT 2 (svt2), TV 3 (tv3), TV 4 (tv4), Kanal 5 (kanal5), TV 8 (tv8), TV 6 (tv6), ZTV (ztv), ViaSat Sport (viasatsport), EuroSport (eurosport), Discovery (discovery), Discovery Mix (discomix), National Geographics (ng), Hallmark (hallmark), TV 1000 (tv1000), Cinema (cinema), Canal Plus (cplus), Canal Plus Yellow (cplusgul), Canal Plus Blue (cplusbla)

EXPORT ^

None.

WWW::Search::Tv::Sweden::TvDotNu ^

This object is the base of all TOC and information retrival. Create one by using new and then one of the object methods

new

Creates a new WWW::Search::Tv::Sweden::TvDotNu object

get_today

Fetches todays TOC and returns a WWW::Search::Tv::Sweden::TvDotNu::DB object that holds todays entries.

get_tomorrow

Fetches tomorrows TOC and returns a WWW::Search::Tv::Sweden::TvDotNu::DB object that holds tomorrows entries.

get_full_entry($entry)

Fetches more information for $entry and fills it up. Returns nothing.

WWW::Search::Tv::Sweden::TvDotNu::DB ^

Each TOC consists of a database of this class. The database itself contains numerous WWW::Search::Tv::Sweden::TvDotNu::Entry object that holds information about each show. The database class provides the following methods for searching the TOC.

channels

Returns a list of abriviated channel names currently in TOC. See above for list.

for_channel(@channels);

Given a list of abriviated channel names, it returns a new database containing only those entries matching the channel search.

between($starth,$startm,$endh,$endm)

Does a match on start time for program. Returns a new database with those entries that starts within the specified times.

entries

Returns a list of the entries in the database.

WWW::Search::Tv::Sweden::TvDotNu::Entry ^

Each program is a entry object of this class. It contains the following methods:

title

Get the title of the program.

channel

Get the name of the channel the program is showing on.

url

Get the URL to http://www.tv.nu/ site where more info can be found.

showview

Get the ShowView number for programming videos or other recodings with.

description

Get a longer description about the program.

imdb

Get a search link to http://www.imdb.com/ for searching for the program.

start_time

Get the starting time for the program formated as HH:MM

end_time

Get the ending time for the program formated as HH::MM

SEE ALSO ^

http://www.tv.nu - For seeing the online version

Todays newspaper should also contain the Television schedule, but it's more fun this way.

AUTHOR ^

Claes Jacobsson, claesjac@cpan.org

COPYRIGHT AND LICENSE ^

Copyright 2003-2004 by Claes Jacobsson

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: