Get guide information between two times - does not seem to be working

Started by RustyKnight, August 25, 2009, 10:27:34 AM

Previous topic - Next topic

RustyKnight

Now this could "user" issue, but I've been looking at the xmlGuide api and trying to figure out better ways to download and manage the data.

I run into a small problem downloading a full days guide (7mb) so I thought I might try and reduce the size by requesting slices of the day (this is also an effort to speed up the xml parsing routines...but that's another story).

My inital request was: (midnight 25/8 to midnight 26/8 - I had been playing around with using 23:59:59:99 as the last time, but this generally gives back the same result anyway)
http://iceguide.icetv.com.au/cgi-bin/epg/iceguide.cgi?op=xmlguide&start_date=090825000000&end_date=090826000000

I then thought I'd only grab a 4 hour window:
http://iceguide.icetv.com.au/cgi-bin/epg/iceguide.cgi?op=xmlguide&start_date=0908250000&end_date=0908250400

But this to downloaded the "whole" days guide (all 7mb) as well??

Any ideas??
Shane

tonymy01

7meg??   I am looking at my Sydney listings.xml file for a whole 7 days and it is only 1.5meg.
ls -l listings*
-rw------- 1 guest root 1540422 Aug 25 04:02 listings.xml
Regards
Tony

Beyonwiz DP-S1 & Topfield 5K (using PerlTGD to upload ICE EPG/timers for the 5K, normal ICE interactive for the Wiz).

Daniel Hall at IceTV

I just did some checking now, and with those URL's you are getting everything in the database for your region (i.e. data for the past 30 days or so along with the next 7) which does give you a 7-8MB file.

Really if you just want to upcoming days you can just use:

http://iceguide.icetv.com.au/cgi-bin/epg/iceguide.cgi?op=xmlguide

and this will give you just the data for future days for your region which be around the 1.5MB mark.

Alternatively an easier way of limiting the amount of days requested is to use:

http://iceguide.icetv.com.au/cgi-bin/epg/iceguide.cgi?op=xmlguide&days=2

which will give you the next 2 days.

In terms of the URLs you gave, the biggest problem is that when specifying down to hh|mm|ss the date format is actually YYYYMMDD and so the correct URL from above would be:

http://iceguide.icetv.com.au/cgi-bin/epg/iceguide.cgi?op=xmlguide&start_date=20090825000000&end_date=20090826000000

Oh and don't forget to add "&desc_length=0" to ensure you get the full description and that its not truncated.

The full updated help guide is currently available at:

http://iceguide.icetv.com.au/cgi-bin/epg/iceguide.cgi?op=help
Regards,

Daniel.
CTO.

RustyKnight

Okay, that kinda makes sense.  I'm obvious taking the date/time information in the docs to literally.

Did another test removing the time information and only got 4kbs which is a lot more managable :P

Thanks for the input.

Shane