def parse_media_json(json_object):
 recordings = {}
 for recording in json_object['recordings']:
  match = re.search('.*\\/(?P<format>.*)', recording['mime_type'])
  file_format = match.group('format')
  if ((recording['mime_type'] == 'vnd.voc/mp4-web') or (recording['display_mime_type'] == 'video/webm')):
   continue
  elif (recording['mime_type'] == 'vnd.voc/h264-hd'):
   name = '1080p'
  elif (recording['mime_type'] == 'vnd.voc/h264-lq'):
   name = '420p'
  elif re.match('audio', recording['display_mime_type']):
   name = ('audio_%s' % file_format)
  elif (recording['hd'] == 'True'):
   name = '1080p'
  else:
   name = '420p'
  recordings[name] = recording['recording_url']
 return recordings

def parse_media_json ( json_object ) : recordings = { } for recording in json_object [ 'recordings' ] : match = re . search ( '.*\\/(?P<format>.*)' , recording [ 'mime_type' ] ) file_format = match . group ( 'format' ) if ( ( recording [ 'mime_type' ] == 'vnd.voc/mp4-web' ) or ( recording [ 'display_mime_type' ] == 'video/webm' ) ) : continue elif ( recording [ 'mime_type' ] == 'vnd.voc/h264-hd' ) : name = '1080p' elif ( recording [ 'mime_type' ] == 'vnd.voc/h264-lq' ) : name = '420p' elif re . match ( 'audio' , recording [ 'display_mime_type' ] ) : name = ( 'audio_%s' % file_format ) elif ( recording [ 'hd' ] == 'True' ) : name = '1080p' else : name = '420p' recordings [ name ] = recording [ 'recording_url' ] return recordings
expose available file formats .