-# coding: utf-8
-from __future__ import unicode_literals
-
from .common import InfoExtractor
from ..compat import compat_str
from ..utils import (
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 {}
if poster:
urlh = self._request_webpage(poster, video_id, fatal=False)
if urlh:
- thumbnail = urlh.geturl()
+ thumbnail = urlh.url
return {
'id': video_id,
'timestamp': int_or_none(entity.get('time_created')),
'uploader': strip_or_none(owner.get('name')),
'uploader_id': uploader_id,
- 'uploader_url': format_field(uploader_id, template='https://www.minds.com/%s'),
+ 'uploader_url': format_field(uploader_id, None, 'https://www.minds.com/%s'),
'view_count': int_or_none(entity.get('play:count')),
'like_count': int_or_none(entity.get('thumbs:up:count')),
'dislike_count': int_or_none(entity.get('thumbs:down:count')),