Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
btpoole
Level 7

Program Guide and zap2xml

In the quest to create a selectable program guide I have searched for a free xml file that provides programming data. I have found one I have been successful (with help from EnTerr) in parsing and populating my grid on a canvas. The problem is that the data seems limited. I have come across a site that provides data and a command line utility called zap2xml that lets the user pass switches and parameters to download an xml file that has all the data in the world. My question is, does anybody know if it's possible to use urlTransfer and pass the needed parameters to get the file to parse? I know I can curl the site but not sure how to pass the switches and parameters. For example

Using the command line zap2xml you would enter
zap2xml -Z 22222 -d 2 -U -Y USA-DITV-DEFAULT -o "MYGUIDE.XML"
Z= zip code
-d= duration or number of days to retrieve
-Y= users default channel line (on website user picks Direct, Dish or other providers depending on location)
-o= output file in xml format

Using curl I am only able to enter zip code and lineup
curl -o test2 http://www.zap2it.com/tvlistings/city?z ... 60-DEFAULT

The return of the curl is in html, not xml which makes it difficult to extract the data.
0 Kudos
3 Replies
RokuMarkn
Level 7

Re: Program Guide and zap2xml

zap2xml is just a perl script, so you can read it yourself and see what it's doing. It uses the LWP::UserAgent library to communicate with zap2it.com, so without studying it in detail I'm nevertheless 100% sure you can do in curl whatever it's doing.

Before you get too carried away, though, zap2it is run by Tribune Media Services, which sells its program guide data commercially. You may want to investigate their terms of service before you assume that you can freely use their data in your app.

--Mark
0 Kudos
btpoole
Level 7

Re: Program Guide and zap2xml

Thanks Mark, didn't realize it was out commercially. Odd they provide you with the free command line program to download the xml though. Will look into it.
Thanks again
0 Kudos
RokuMarkn
Level 7

Re: Program Guide and zap2xml

I don't see any evidence that TMS has anything to do with the zap2xml script. I think it's by a third party.

The reason you don't find a lot of free guide data is that it is expensive to gather the data, so it's only done by a handful of companies, who expect to get paid for their efforts. I once sat through a presentation by TMS about how they gather the data, and the amount of labor involved is quite impressive.

--Mark
0 Kudos