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

Discussion about Schedules Direct grabber code and data formats.

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

Postby jpboard3 » Thu Feb 21, 2008 1:48 pm

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!!)
jpboard3
 
Posts: 7
Joined: Thu Feb 21, 2008 1:44 pm

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

Postby rmeden » Thu Feb 21, 2008 9:17 pm

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
rmeden
SD Board Member
 
Posts: 1512
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX

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

Postby jpboard3 » Fri Feb 22, 2008 2:01 pm

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?

Postby jpboard3 » Fri Feb 22, 2008 3:14 pm

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.
jpboard3
 
Posts: 7
Joined: Thu Feb 21, 2008 1:44 pm

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

Postby rmeden » Fri Feb 22, 2008 4:46 pm

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: 1512
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX

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

Postby rmeden » Fri Feb 22, 2008 5:22 pm

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;
rmeden
SD Board Member
 
Posts: 1512
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX

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

Postby jpboard3 » Fri Feb 22, 2008 5:39 pm

Wow, Thank You! Exactly what I want.
jpboard3
 
Posts: 7
Joined: Thu Feb 21, 2008 1:44 pm


Return to Developers Corner

Who is online

Users browsing this forum: No registered users and 5 guests