NAME
WWW::Search::Tv::German::Tvtoday - checking a directory for bad letters in filenames
PLATFORMS
Tested with
Win32
Linux
SYNOPSIS
#!/usr/bin/perl
use strict;
use WWW::Search::Tv::German::Tvtoday 1.02;
my $tv = WWW::Search::Tv::German::Tvtoday->new(
today=>1,
tomorrow=>1,
proxy => 'http://gatekeeper.rosi13.de:3128');
$tv->searchfor("Maus");
$tv->searchfor("Sendung mit");
$tv->searchfor("Tagesschau","news");
$tv->dontcareforstation('ORF','VIVA');
printf "Get results for %s\n", join(" * ",$tv->get_searchvalues());
print "This takes a while to get, please wait...\n";
my @found = $tv->search();
foreach my $f ($tv->get_resultset()) {
printf "*** what : %s\n",$f->{what};
printf " where: %s\n",$f->{where};
printf " when : %s\n",$f->{when};
}
DESCRIPTION
Get television-program from german www.tvtoday.de and search for special broadcasts. The result could be input for a notice-mail or a webpage.
METHODS
new()
Create object for fetching the information from tvtoday.de. Needed to work with this module.
Alle Parameters are optional:
today =>1|0 Get tv-programm from today (default is 1) tomorrow =>1|0 Get tv-programm from today (default is 1) proxy, proxy_user, proxy_pass If you can access the internet only through a WWW-proxyserver.
Return value: The object in which the program lives.
searchfor($keyword)
The words to search for. You can use simple words, phrases with spaces in it. Also umlauts are allowed. Can be called multiple times.
$tv->searchfor("pink");
$tv->searchfor("panther");
$tv->searchfor("alf");
$tv->searchfor("the quest");
$tv->searchfor("the quest","adventures of");
dontcareforstation
Maybe you cannot get or don't like stations which are in the result of the query. You can filter them out from the resultset with this command.
$tv->dontcareforstation("VIVA");
$tv->dontcareforstation("ARD","SAT1");
search
Here begins the work for the programm. For every search-keyword a request is sent to the webserver and the answer-pages are interpreted. All results will be unified (you could find the same broadcast with different words, like "pink" and "panther").
$tv->search();
You can access the resultset via get_resultset()
Return value: Nothing.
get_resultset
Get back the result after calling "search". You get back a list of hashes where every element contains the hashkeys "what", "where" and "when". The list is sorted by date/time.
my @found = $tv->search();
foreach my $f ($tv->get_resultset()) {
printf "*** what : %s\n",$f->{what};
printf " where: %s\n",$f->{where};
printf " when : %s\n",$f->{when};
}
get_searchvalues
Get a list of values which are searched for at tvtoday.
my @searchingfor = $tv->get_searchvalues();
BUGS
Does not
* recognize or check more than the first page of the resultset from tvtoday.de
* take care about VPS or Showview
EXPORT
None.
AUTHOR
Richard Lippmann <horshack@lisa.franken.de>
HISTORY
V1.02 - Initial release