[peertube] reduce request amount if webpage downloaded

This commit is contained in:
Laura Liberda 2021-01-24 06:13:30 +01:00
parent e65850dfd5
commit d14745983d

View file

@ -135,11 +135,13 @@ class PeerTubeSHIE(SelfhostedInfoExtractor):
formats.append(f)
self._sort_formats(formats)
description = None
if webpage:
description = self._og_search_description(webpage)
if not description:
full_description = self._call_api(
host, video_id, 'description', note='Downloading description JSON',
fatal=False)
description = None
if isinstance(full_description, dict):
description = str_or_none(full_description.get('description'))
if not description: