1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-06-02 18:39:29 +00:00

Ensure primary is a dict

Test commit to provoke CI tests
This commit is contained in:
dirkf 2022-10-30 21:07:50 +00:00 committed by GitHub
parent d75cf3ade0
commit 54a1f498f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,6 +7,7 @@ from ..utils import (
clean_html,
int_or_none,
strip_or_none,
try_get,
unified_timestamp,
urlencode_postdata,
)
@ -91,7 +92,7 @@ class ParlerIE(InfoExtractor):
data = self._download_json(
'https://parler.com/open-api/ParleyDetailEndpoint.php', video_id,
data=urlencode_postdata({'uuid': video_id}))['data'][0]
primary = data['primary']
primary = try_get(data, lambda x: x['primary'], dict) or {}
embed = self._parse_json(primary.get('V2LINKLONG') or '', video_id, fatal=False)
if embed: