Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
btpoole
Channel Surfer

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 3
RokuMarkn
Visitor

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
Channel Surfer

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
Visitor

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
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.