1.) I wonder, why we need to use a special format for the date element?
Why not use:
attr['date'] = child.content
instead of:
attr['date'] = int(time.mktime(time.strptime(child.content, fmt)))

2.) Is the format of the date element in xmltv always either %Y-%m-%d or 
%Y? In the xmltv.dtd I found:
""""
"All dates and times in this DTD follow the same format, loosely based
"on ISO 8601.  They can be 'YYYYMMDDhhmmss' or some initial
"substring, for example if you only know the year and month you can
"have 'YYYYMM'.  You can also append a timezone to the end; if no
"explicit timezone is given, UTC is assumed.  Examples:
"'200007281733 BST', '200209', '19880523083000 +0300'.  (BST == +0100.)
""""
Thus a real xmltv file with date info that contains more than just the 
year, also would fail!

3.) Still my grabber should be compatible with xmltv, thus I will have 
to change its behaviour and deal with the 1994/95 case. Grrrrr!

Tanja


Dirk Meyer schrieb:
> Tanja wrote:
>> Hi
>>
>> Seems that I do have a problem with the time format here.
>> I guess I will have to look into this.
>> The grabber works perfectly with freevo-1.x.
>> Do you have any hints on this?
> 
> Looking at the code I see
> | secs = time.mktime(strptime.strptime(timestr, xmltv.date_format))
> 
> But I have no idea where it is defined or if it is even used. The part
> where you see the crash the mapping is
> | fmt = "%Y-%m-%d"
> | if len(child.content) == 4:
> |     fmt = "%Y"
> 
>> ValueError: time data did not match format:  data=1994/95  fmt=%Y-%m-%d
> 
> ... while this looks kind of strange (1994/95). Besides, it would be
> nice not to use your code to map epgdata.com -> XMLTV -> kaa.epg but
> to add a source grabber directly into kaa.epg.
> 
> 
> Dischi
> 
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Freevo-devel mailing list
> Freevo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freevo-devel

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to