NAME
WWW::Search::Yahoo::TV::Echostar - backend for searching tv.yahoo.com
SYNOPSIS
use WWW::Search;
my $oSearch = new WWW::Search('Yahoo::TV::Echostar');
my $sQuery = WWW::Search::escape_query("Bai Ling");
$oSearch->native_query($sQuery);
while (my $oResult = $oSearch->next_result())
print $oResult->url, "\n";
DESCRIPTION
This class is a Yahoo specialization of WWW::Search. It handles
making and interpreting Yahoo TV searches http://tv.yahoo.com.
NOTES
This backend does a basic keyword search against the Echostar (Dish
Network) East Coast channel lineup. The query is a set of words
(phrase searching is not supported at tv.yahoo.com). By default, the
query terms are ORed and applied to all available fields (title,
subtitle, description, and cast/crew). See below for how to do
Advanced search on these fields individually.
METHODS
In addition to the following special method(s), this class exports the
entire WWW::Search interface.
ignore_channels(@)
The arguments are a list of TV channels
(by the 3- to 6-letter abbreviation used on Yahoo.com).
URLs for TV programs on any of these channels will not be returned.
(But note that approximate_result_count() will still count them!)
For example, if you do not subscribe to HBO, and you don't care about
network shows on the West Coast, do something like the following
anytime before calling results() or next_result() or the like:
$oSearch->ignore_channels(qw( HBO HBOW HBO2E HBO2W KABC KCBS KNBC ));
OPTIONS
To do advanced search (by subtitle, description, cast/crew) add the
following options to the native_query(). For example, if you want to
see if the lovely Lena Olin appears anytime in the next 24 hours:
$oSearch->native_query('',
{
search => 'adv',
contrib => 'Lena Olin',
range => 1,
},
);
Note: if you search agains more than one of the fields, the result
will be the AND of the searches. For example, the following search
will never return anything:
$oSearch->native_query('',
{
search => 'adv',
title => 'football',
subtit => 'Yankees',
desc => 'Enterprise',
contrib => 'Madonna',
range => 1,
},
);
- search => 'adv'
-
This option is required if you want to use any of the following:
- title => 'title words'
-
Series title, like "Star Trek"; or sport, like "College Football".
- subtit => 'subtitle words'
-
Episode title, like "All Our Yesterdays"; or team, like "Ohio State".
- desc => 'description words'
-
Searches for words in the description.
- contrib => 'Actor Name'
-
Unfortunately, tv.yahoo.com does not allow phrase searches, so "Diane
Lane" returns a lot of bogus hits for "The Nanny", which stars Lauren
Lane and was directed by Diane Somebody.
- range => 1
-
To search only the next 24 hours.
- range => 7
-
To search the next 7 days. This is the default.
- range => 14
-
To search the next 14 days.
- sort => 'timesort'
-
To sort the results chronologically.
- sort => 'score'
-
To sort the results by relevance.
SEE ALSO
To make new back-ends, see WWW::Search.
BUGS
Please tell the author if you find any!
AUTHOR
Martin Thurn mthurn@cpan.org
LEGALESE
THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.