From 868bc14743e75bdaf83a4bfd90ad967d38d21734 Mon Sep 17 00:00:00 2001 From: bashonly Date: Mon, 2 Dec 2024 23:01:00 -0600 Subject: [PATCH] simplify Authored by: bashonly --- yt_dlp/extractor/vk.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/yt_dlp/extractor/vk.py b/yt_dlp/extractor/vk.py index bf9f80f92a..6ea52f6a16 100644 --- a/yt_dlp/extractor/vk.py +++ b/yt_dlp/extractor/vk.py @@ -597,11 +597,9 @@ class VKUserVideosIE(VKBaseIE): self._search_json(r'\bvar newCur\s*=', webpage, 'cursor data', u_id), ('oid', {int}, {str_or_none}, {require('page id')})) section = traverse_obj(parse_qs(url), ('section', 0)) or 'all' - elif '_' in u_id: - page_id, section = u_id.split('_', 1) - section = f'playlist_{section}' else: - raise ExtractorError('Invalid URL', expected=True) + page_id, _, section = u_id.partition('_') + section = f'playlist_{section}' playlist_title = clean_html(get_element_by_class('VideoInfoPanel__title', webpage)) return self.playlist_result(self._entries(page_id, section), f'{page_id}_{section}', playlist_title)