[arte] fix bug when VDA field not found in json file

This commit is contained in:
Bezleputh 2014-02-24 20:03:44 +01:00
commit 057901f796

View file

@ -90,7 +90,6 @@ class ArteBrowser(BaseBrowser):
return self.fill_live_video(video, json_url) return self.fill_live_video(video, json_url)
def fill_live_video(self, video, json_url): def fill_live_video(self, video, json_url):
response = self.openurl(json_url) response = self.openurl(json_url)
result = simplejson.loads(response.read(), self.ENCODING) result = simplejson.loads(response.read(), self.ENCODING)
@ -110,6 +109,7 @@ class ArteBrowser(BaseBrowser):
video.url = u'%s' % url video.url = u'%s' % url
video.ext = u'%s' % ext video.ext = u'%s' % ext
if 'VDA' in result['videoJsonPlayer']:
date_string = result['videoJsonPlayer']['VDA'][:-6] date_string = result['videoJsonPlayer']['VDA'][:-6]
try: try: