What's the easiest way to get the raw listings?

Discussion about Schedules Direct grabber code and data formats.
Post Reply
jpboard3
Posts: 7
Joined: Thu Feb 21, 2008 1:44 pm

What's the easiest way to get the raw listings?

Post by jpboard3 »

I'm giving up on XMLTV. I ran into 5 or 6 problems getting it installed (the last was that "tv_grab_na_dd --configure" failed because of an undefined subroutine ask_choice). Is there an easier way to get at the raw listings data?
I don't need all the bells and whistles in XMLTV (like Japanese characters!!)

rmeden
SD Board Member
Posts: 1579
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX
Contact:

Re: What's the easiest way to get the raw listings?

Post by rmeden »

I would say XMLTV is the easiest...

What OS?
How did you (try to) install XMLTV.

Did you install XMLTV? It sounds like it wasn't installed properly.

Robert

jpboard3
Posts: 7
Joined: Thu Feb 21, 2008 1:44 pm

Re: What's the easiest way to get the raw listings?

Post by jpboard3 »

I tried to install XMLTV. After spending about 4 hours on it, I gave up. It's probably a problem with my machine, or my Perl installation, or whatever (I'm not a unix guru). Be that as it may, I just want to get the TV listings, and I don't need all the XMLTV bells and whistles.

I'm a bit suprised that there is no simple "one-liner" to simply retrieve the listings in whatever raw XML format they are stored in. But it seems like that's the case. Is that so?

jpboard3
Posts: 7
Joined: Thu Feb 21, 2008 1:44 pm

Re: What's the easiest way to get the raw listings?

Post by jpboard3 »

The xmltv installation required me to install 27 perl modules before I could even attempt to get the xmltv programs to work. 27! Surely xmltv isn't the easiest way.

rmeden
SD Board Member
Posts: 1579
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX
Contact:

Re: What's the easiest way to get the raw listings?

Post by rmeden »

You can install it via a RPM.

I don't think the TV_GRAB_NA_DD grabber needs that many modules.... you don't need to install *very* grabber, just tv_grab_na_dd.

I'll see if I can write a short perl script to download the data.

Robert

rmeden
SD Board Member
Posts: 1579
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX
Contact:

Re: What's the easiest way to get the raw listings?

Post by rmeden »

here ya go

Code: Select all

#!perl
#
# Quick sample script to fetch data from Tribune
#
use SOAP::Lite;

$USER='username';
$PASS='password';
$START='2008-02-22T00:00:00Z';
$STOP='2008-02-23T23:59:59Z';

#
# Fetch data
# 
    sub SOAP::Transport::HTTP::Client::get_basic_credentials
    {
       return lc($USER) => "$PASS";
    }

    my $dd_service='http://docs.tms.tribune.com/tech/tmsdatadirect/schedulesdirect/tvDataDelivery.wsdl';
    my $proxy='http://localhost/';
    my $soap= SOAP::Lite
            -> service($dd_service)
            -> outputxml('true')
            -> proxy($proxy, options => {compress_threshold => 10000,
                                         timeout            => 420});

#
# It's polite to set an agent string
#
    $soap->transport->agent("perl/$0");

    my $raw_data=$soap->download($START,$STOP);
    print $raw_data;
exit 0;

jpboard3
Posts: 7
Joined: Thu Feb 21, 2008 1:44 pm

Re: What's the easiest way to get the raw listings?

Post by jpboard3 »

Wow, Thank You! Exactly what I want.

Post Reply