From 88ff88b2750212b15670e114440a938281da408f Mon Sep 17 00:00:00 2001 From: JChris246 <43832407+JChris246@users.noreply.github.com> Date: Fri, 6 Jan 2023 11:35:58 -0400 Subject: [PATCH] refactor: make suggested changes Co-authored-by: dirkf --- youtube_dl/extractor/cammodels.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/youtube_dl/extractor/cammodels.py b/youtube_dl/extractor/cammodels.py index 7bdc2933f..d2e860b24 100644 --- a/youtube_dl/extractor/cammodels.py +++ b/youtube_dl/extractor/cammodels.py @@ -62,15 +62,14 @@ class CamModelsIE(InfoExtractor): # hls skips fragments, preferring rtmp 'preference': -1, }) - elif format_id == 'jpeg': - thumbnails.append({ - 'url': f.get('url'), - 'width': f.get('width'), - 'height': f.get('height'), - 'format_id': f.get('format_id') - }) - continue else: + if format_id == 'jpeg': + thumbnails.append({ + 'url': f['url'], + 'width': f['width'], + 'height': f['height'], + 'format_id': f['format_id'], + }) continue formats.append(f) self._sort_formats(formats)