mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-04-30 12:36:03 +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,
|
get_element_html_by_id,
|
||||||
int_or_none,
|
int_or_none,
|
||||||
join_nonempty,
|
join_nonempty,
|
||||||
|
parse_qs,
|
||||||
parse_resolution,
|
parse_resolution,
|
||||||
str_or_none,
|
str_or_none,
|
||||||
str_to_int,
|
str_to_int,
|
||||||
@ -588,7 +589,7 @@ class VKUserVideosIE(VKBaseIE):
|
|||||||
video_list = video_list_json['list']
|
video_list = video_list_json['list']
|
||||||
|
|
||||||
def _real_extract(self, url):
|
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)
|
webpage = self._download_webpage(url, u_id)
|
||||||
|
|
||||||
if u_id.startswith('@'):
|
if u_id.startswith('@'):
|
||||||
@ -601,8 +602,7 @@ class VKUserVideosIE(VKBaseIE):
|
|||||||
else:
|
else:
|
||||||
raise ExtractorError('Invalid URL', expected=True)
|
raise ExtractorError('Invalid URL', expected=True)
|
||||||
|
|
||||||
if not section:
|
section = traverse_obj(parse_qs(url), ('section', 0)) or 'all'
|
||||||
section = 'all'
|
|
||||||
|
|
||||||
playlist_title = clean_html(get_element_by_class('VideoInfoPanel__title', webpage))
|
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)
|
return self.playlist_result(self._entries(page_id, section), f'{page_id}_{section}', playlist_title)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user