[peertube] reduce request amount if webpage downloaded
This commit is contained in:
parent
e65850dfd5
commit
d14745983d
|
@ -135,13 +135,15 @@ class PeerTubeSHIE(SelfhostedInfoExtractor):
|
||||||
formats.append(f)
|
formats.append(f)
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
full_description = self._call_api(
|
|
||||||
host, video_id, 'description', note='Downloading description JSON',
|
|
||||||
fatal=False)
|
|
||||||
|
|
||||||
description = None
|
description = None
|
||||||
if isinstance(full_description, dict):
|
if webpage:
|
||||||
description = str_or_none(full_description.get('description'))
|
description = self._og_search_description(webpage)
|
||||||
|
if not description:
|
||||||
|
full_description = self._call_api(
|
||||||
|
host, video_id, 'description', note='Downloading description JSON',
|
||||||
|
fatal=False)
|
||||||
|
if isinstance(full_description, dict):
|
||||||
|
description = str_or_none(full_description.get('description'))
|
||||||
if not description:
|
if not description:
|
||||||
description = video.get('description')
|
description = video.get('description')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue