mirror of
https://github.com/yt-dlp/yt-dlp
synced 2024-11-16 07:48:01 +01:00
[Rutube] Add RutubeChannelIE (#1970)
Closes #1966 Authored by: Ashish0804
This commit is contained in:
parent
b5f94e4fa1
commit
13debc86e7
2 changed files with 19 additions and 3 deletions
|
@ -1265,6 +1265,7 @@ from .rutube import (
|
|||
RutubeMovieIE,
|
||||
RutubePersonIE,
|
||||
RutubePlaylistIE,
|
||||
RutubeTagsIE,
|
||||
)
|
||||
from .rutv import RUTVIE
|
||||
from .ruutu import RuutuIE
|
||||
|
|
|
@ -230,9 +230,9 @@ class RutubePlaylistBaseIE(RutubeBaseIE):
|
|||
return self._extract_playlist(self._match_id(url))
|
||||
|
||||
|
||||
class RutubeChannelIE(RutubePlaylistBaseIE):
|
||||
IE_NAME = 'rutube:channel'
|
||||
IE_DESC = 'Rutube channels'
|
||||
class RutubeTagsIE(RutubePlaylistBaseIE):
|
||||
IE_NAME = 'rutube:tags'
|
||||
IE_DESC = 'Rutube tags'
|
||||
_VALID_URL = r'https?://rutube\.ru/tags/video/(?P<id>\d+)'
|
||||
_TESTS = [{
|
||||
'url': 'http://rutube.ru/tags/video/1800/',
|
||||
|
@ -312,3 +312,18 @@ class RutubePlaylistIE(RutubePlaylistBaseIE):
|
|||
playlist_kind = qs['pl_type'][0]
|
||||
playlist_id = qs['pl_id'][0]
|
||||
return self._extract_playlist(playlist_id, item_kind=playlist_kind)
|
||||
|
||||
|
||||
class RutubeChannelIE(RutubePlaylistBaseIE):
|
||||
IE_NAME = 'rutube:channel'
|
||||
IE_DESC = 'Rutube channel'
|
||||
_VALID_URL = r'https?://rutube\.ru/channel/(?P<id>\d+)/videos'
|
||||
_TESTS = [{
|
||||
'url': 'https://rutube.ru/channel/639184/videos/',
|
||||
'info_dict': {
|
||||
'id': '639184',
|
||||
},
|
||||
'playlist_mincount': 133,
|
||||
}]
|
||||
|
||||
_PAGE_TEMPLATE = 'http://rutube.ru/api/video/person/%s/?page=%s&format=json'
|
||||
|
|
Loading…
Reference in a new issue