mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-04-09 10:23:44 +00:00
[ie/vk:uservideos] Fix section
Authored by: bashonly
This commit is contained in:
parent
14824e0c5c
commit
2c62a9cb2b
@ -17,6 +17,7 @@ from ..utils import (
|
||||
get_element_html_by_id,
|
||||
int_or_none,
|
||||
join_nonempty,
|
||||
parse_qs,
|
||||
parse_resolution,
|
||||
str_or_none,
|
||||
str_to_int,
|
||||
@ -588,7 +589,7 @@ class VKUserVideosIE(VKBaseIE):
|
||||
video_list = video_list_json['list']
|
||||
|
||||
def _real_extract(self, url):
|
||||
u_id, section = self._match_valid_url(url).groups()
|
||||
u_id = self._match_id(url)
|
||||
webpage = self._download_webpage(url, u_id)
|
||||
|
||||
if u_id.startswith('@'):
|
||||
@ -601,8 +602,7 @@ class VKUserVideosIE(VKBaseIE):
|
||||
else:
|
||||
raise ExtractorError('Invalid URL', expected=True)
|
||||
|
||||
if not section:
|
||||
section = 'all'
|
||||
section = traverse_obj(parse_qs(url), ('section', 0)) or 'all'
|
||||
|
||||
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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user