From 2383359a6d85a8be4b53b374d97d72dabc67f138 Mon Sep 17 00:00:00 2001 From: Tristan Lee Date: Sat, 2 Apr 2022 20:56:45 -0500 Subject: [PATCH] handled case where video is a single image --- polyphemus/base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/polyphemus/base.py b/polyphemus/base.py index e080cf8..aced8ab 100644 --- a/polyphemus/base.py +++ b/polyphemus/base.py @@ -89,9 +89,11 @@ class OdyseeVideo: elif 'claim_hash' in full_video_info['value']: video_type = 'repost' duration = None - full_video_info['value'] = full_video_info['reposted_claim']['value'] full_video_info['canonical_url'] = full_video_info['reposted_claim']['canonical_url'] + elif 'image' in full_video_info['value']: + video_type = 'image' + duration = None else: raise KeyError(f'nether `video`, `audio`, nor `claim_hash` keys are in `full_video_info["value"]`, only {full_video_info["value"].keys()}')