From 4c6bb4189bccf019818e23a4bd028b4559bb169d Mon Sep 17 00:00:00 2001 From: bashonly Date: Sun, 1 Jun 2025 13:48:31 -0500 Subject: [PATCH] [ie/vk] Transforming with `unescapeHTML` is unsafe without first expecting `str` Authored by: bashonly --- yt_dlp/extractor/vk.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yt_dlp/extractor/vk.py b/yt_dlp/extractor/vk.py index c269802b37..8a106adb97 100644 --- a/yt_dlp/extractor/vk.py +++ b/yt_dlp/extractor/vk.py @@ -548,21 +548,21 @@ class VKIE(VKBaseIE): 'formats': formats, 'subtitles': subtitles, **traverse_obj(mv_data, { - 'title': ('title', {unescapeHTML}), + 'title': ('title', {str}, {unescapeHTML}), 'description': ('desc', {clean_html}, filter), 'duration': ('duration', {int_or_none}), 'like_count': ('likes', {int_or_none}), 'comment_count': ('commcount', {int_or_none}), }), **traverse_obj(data, { - 'title': ('md_title', {unescapeHTML}), + 'title': ('md_title', {str}, {unescapeHTML}), 'description': ('description', {clean_html}, filter), 'thumbnail': ('jpg', {url_or_none}), - 'uploader': ('md_author', {unescapeHTML}), + 'uploader': ('md_author', {str}, {unescapeHTML}), 'uploader_id': (('author_id', 'authorId'), {str_or_none}, any), 'duration': ('duration', {int_or_none}), 'chapters': ('time_codes', lambda _, v: isinstance(v['time'], int), { - 'title': ('text', {unescapeHTML}), + 'title': ('text', {str}, {unescapeHTML}), 'start_time': 'time', }), }),