+ try:
+ video = self._download_json(
+ 'https://api.redbull.tv/v3/products/' + video_id,
+ video_id, note='Downloading video information',
+ headers={'Authorization': token}
+ )
+ except ExtractorError as e:
+ if isinstance(e.cause, compat_HTTPError) and e.cause.code == 404:
+ error_message = self._parse_json(
+ e.cause.read().decode(), video_id)['error']
+ raise ExtractorError('%s said: %s' % (
+ self.IE_NAME, error_message), expected=True)
+ raise