[arte] fix bug when VDA field not found in json file
This commit is contained in:
parent
441518cf74
commit
057901f796
1 changed files with 6 additions and 6 deletions
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue