[vrtnu] Address comments

This commit is contained in:
mrBliss 2017-10-22 17:20:11 +02:00
parent 2b5a935ea4
commit c98d241de2

View File

@ -291,16 +291,15 @@ class VrtNUIE(InfoExtractor):
# We are dealing with a '../<show>.relevant' URL # We are dealing with a '../<show>.relevant' URL
redirect_url = json.get('url') redirect_url = json.get('url')
if redirect_url: if redirect_url:
return self._real_extract('https:' + redirect_url) return self.url_result('https:' + redirect_url)
else: else:
# There is only one entry, but with an unknown key, so just get # There is only one entry, but with an unknown key, so just get
# the first one # the first one
video_id = list(json.values())[0].get('videoid') video_id = list(json.values())[0].get('videoid')
print(video_id)
return { return {
'_type': 'url_transparent', '_type': 'url_transparent',
'url': 'https://mediazone.vrt.be/api/v1/%s/assets/%s' % ('vrtvideo', video_id), 'url': 'https://mediazone.vrt.be/api/v1/vrtvideo/assets/%s' % video_id,
'ie_key': CanvasIE.ie_key(), 'ie_key': CanvasIE.ie_key(),
'id': video_id, 'id': video_id,
'display_id': display_id, 'display_id': display_id,