WWW::Search::Tv::Sweden::TvDotNu - Perl extension for fetching television program from swedish site http://www.tv.nu
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"; } }
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)
None.
This object is the base of all TOC and information retrival. Create one by using new and then one of the object methods
Creates a new WWW::Search::Tv::Sweden::TvDotNu object
Fetches todays TOC and returns a WWW::Search::Tv::Sweden::TvDotNu::DB object that holds todays entries.
Fetches tomorrows TOC and returns a WWW::Search::Tv::Sweden::TvDotNu::DB object that holds tomorrows entries.
Fetches more information for $entry and fills it up. Returns nothing.
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.
Returns a list of abriviated channel names currently in TOC. See above for list.
Given a list of abriviated channel names, it returns a new database containing only those entries matching the channel search.
Does a match on start time for program. Returns a new database with those entries that starts within the specified times.
Returns a list of the entries in the database.
Each program is a entry object of this class. It contains the following methods:
Get the title of the program.
Get the name of the channel the program is showing on.
Get the URL to http://www.tv.nu/ site where more info can be found.
Get the ShowView number for programming videos or other recodings with.
Get a longer description about the program.
Get a search link to http://www.imdb.com/ for searching for the program.
Get the starting time for the program formated as HH:MM
Get the ending time for the program formated as HH::MM
http://www.tv.nu - For seeing the online version
Todays newspaper should also contain the Television schedule, but it's more fun this way.
Claes Jacobsson, claesjac@cpan.org
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.
To install WWW::Search::Tv::Sweden::TvDotNu, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Search::Tv::Sweden::TvDotNu
CPAN shell
perl -MCPAN -e shell install WWW::Search::Tv::Sweden::TvDotNu
For more information on module installation, please visit the detailed CPAN module installation guide.