[radiofrance] fix bug parsing json

This commit is contained in:
Bezleputh 2015-06-27 21:34:44 +02:00 committed by Florent Fourcot
commit 6fe9170a9e

View file

@ -48,7 +48,7 @@ class TimelinePage(JsonPage):
for item in self.doc: for item in self.doc:
if item['debut'] < now and item['fin'] > now: if item['debut'] < now and item['fin'] > now:
emission = '' emission = ''
if 'diffusions' in item and item['diffusions']: if 'diffusions' in item and item['diffusions'] and 'title' in item['diffusions'][0]:
emission = item['diffusions'][0]['title'] emission = item['diffusions'][0]['title']
title = item['title_emission'] title = item['title_emission']