[peertube] Fix videos without description (#639)

Authored by: u-spec-png
This commit is contained in:
SsSsS 2021-08-08 03:56:44 +00:00 committed by GitHub
parent 858a65ecc1
commit bfd56b74b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -427,7 +427,7 @@ class PeerTubeIE(InfoExtractor):
''' % (_INSTANCES_RE, _UUID_RE) ''' % (_INSTANCES_RE, _UUID_RE)
_TESTS = [{ _TESTS = [{
'url': 'https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d', 'url': 'https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d',
'md5': '9bed8c0137913e17b86334e5885aacff', 'md5': '8563064d245a4be5705bddb22bb00a28',
'info_dict': { 'info_dict': {
'id': '9c9de5e8-0a1e-484a-b099-e80766180a6d', 'id': '9c9de5e8-0a1e-484a-b099-e80766180a6d',
'ext': 'mp4', 'ext': 'mp4',
@ -570,7 +570,7 @@ class PeerTubeIE(InfoExtractor):
self._sort_formats(formats) self._sort_formats(formats)
description = video.get('description') description = video.get('description')
if len(description) >= 250: if description and len(description) >= 250:
# description is shortened # description is shortened
full_description = self._call_api( full_description = self._call_api(
host, video_id, 'description', note='Downloading description JSON', host, video_id, 'description', note='Downloading description JSON',