made filesize field optional

This commit is contained in:
Parth Verma 2018-05-01 15:46:04 +05:30
parent 06ad3fee3a
commit 6655bbcc13

View File

@ -32,6 +32,6 @@ class PeertubeIE(InfoExtractor):
'id': video_id, 'id': video_id,
'title': details.get('name'), 'title': details.get('name'),
'description': details.get('description'), 'description': details.get('description'),
'formats': [{'url': file_data['fileUrl'], 'filesize': file_data['size']} for file_data in sorted(details['files'], key=lambda x: x['size'])], 'formats': [{'url': file_data['fileUrl'], 'filesize': file_data.get('size')} for file_data in sorted(details['files'], key=lambda x: x['size'])],
'thumbnail': urljoin(base_url, details['thumbnailPath']) 'thumbnail': urljoin(base_url, details['thumbnailPath'])
} }