Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/utreon.py (Python)

Code before:
            'description': 'md5:fb5a6c2e506f013cc76f133f673bc5c8',
            'uploader': 'Nomad Capitalist',
            'thumbnail': 'https://data-1.utreon.com/v/ZD/k1/Mj/C4ZxXhYBBmE/C4ZxXhYBBmE_628342076198c9c06dd6b2c665978584_cover.jpg',
            'release_date': '20210723',
        }
    }, {
        'url': 'https://utreon.com/v/Y-stEH-FBm8',
        'info_dict': {
            'id': 'Y-stEH-FBm8',
            'ext': 'mp4',
            'title': 'Creeper-Chan Pranks Steve! 💚 [MINECRAFT ANIME]',
            'description': 'md5:7a48450b0d761b96dec194be0c5ecb5f',
            'uploader': 'Merryweather Comics',
            'thumbnail': 'https://data-1.utreon.com/v/MT/E4/Zj/Y-stEH-FBm8/Y-stEH-FBm8_5290676a41a4a1096db133b09f54f77b_cover.jpg',
            'release_date': '20210718',
        }},
    ]

    _formats = {
        'video_144p_url': 144,
        'video_240p_url': 240,
        'video_360p_url': 360,
        'video_480p_url': 480,
        'video_720p_url': 720,
        'video_1080p_url': 1080,
    }

    def _real_extract(self, url):
        video_id = self._match_id(url)
        json_data = self._download_json(
            'https://api.utreon.com/v1/videos/' + video_id,
            video_id)
        videos_json = json_data['videos']
        formats = [{
            'url': videos_json[format_key],
            'format_id': '%dp' % self._formats[format_key],
            'height': self._formats[format_key],
        } for format_key in list(videos_json.keys())]
        self._sort_formats(formats)
        thumbnail = url_or_none(json_data.get('cover_image_url'))\
            if url_or_none(json_data.get('cover_image_url'))\
            else url_or_none(json_data.get('preview_image_url'))

        return {
            'id': video_id,
            'title': json_data['title'],
            'formats': formats,
            'description': str_or_none(json_data.get('description')),
            'duration': int_or_none(json_data.get('duration')),
            'uploader': str_or_none(try_get(json_data, lambda x: x['channel']['title'])),
            'thumbnail': thumbnail,

Review comment (suggestion):
why not directly parse it from the string. That way, if they add new resolutions, it will automatically work

Code after:
            'title': 'Biden’s Capital Gains Tax Rate to Test World’s Highest',
            'description': 'md5:fb5a6c2e506f013cc76f133f673bc5c8',
            'uploader': 'Nomad Capitalist',
            'thumbnail': 'https://data-1.utreon.com/v/ZD/k1/Mj/C4ZxXhYBBmE/C4ZxXhYBBmE_628342076198c9c06dd6b2c665978584_cover.jpg',
            'release_date': '20210723',
        }
    }, {
        'url': 'https://utreon.com/v/Y-stEH-FBm8',
        'info_dict': {
            'id': 'Y-stEH-FBm8',
            'ext': 'mp4',
            'title': 'Creeper-Chan Pranks Steve! 💚 [MINECRAFT ANIME]',
            'description': 'md5:7a48450b0d761b96dec194be0c5ecb5f',
            'uploader': 'Merryweather Comics',
            'thumbnail': 'https://data-1.utreon.com/v/MT/E4/Zj/Y-stEH-FBm8/Y-stEH-FBm8_5290676a41a4a1096db133b09f54f77b_cover.jpg',
            'release_date': '20210718',
        }},
    ]

    def _real_extract(self, url):
        video_id = self._match_id(url)
        json_data = self._download_json(
            'https://api.utreon.com/v1/videos/' + video_id,
            video_id)
        videos_json = json_data['videos']
        formats = [{
            'url': format_url,
            'format_id': format_key.split('_')[1],
            'height': int(format_key.split('_')[1][:-1]),
        } for format_key, format_url in videos_json.items() if url_or_none(format_url)]
        self._sort_formats(formats)
        thumbnail = url_or_none(dict_get(json_data, ('cover_image_url', 'preview_image_url')))
        return {
            'id': video_id,
            'title': json_data['title'],
            'formats': formats,
            'description': str_or_none(json_data.get('description')),
            'duration': int_or_none(json_data.get('duration')),
            'uploader': str_or_none(try_get(json_data, lambda x: x['channel']['title'])),
            'thumbnail': thumbnail,
            'release_date': unified_strdate(json_data.get('published_datetime')),
        }