else:
return self.url_result(entity['perma_url'])
else:
- assert(entity['subtype'] == 'video')
+ assert entity['subtype'] == 'video'
video_id = entity_id
# 1080p and webm formats available only on the sources array
video = self._call_api(
'height': int_or_none(source.get('size')),
'url': src,
})
- self._sort_formats(formats)
entity = video.get('entity') or entity
owner = entity.get('ownerObj') or {}