mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-15 18:34:22 +00:00
[yandexmusic:album] Simplify
This commit is contained in:
parent
ab62bc5838
commit
c98052c5da
@ -247,7 +247,7 @@ class YandexMusicPlaylistBaseIE(YandexMusicBaseIE):
|
|||||||
class YandexMusicAlbumIE(YandexMusicPlaylistBaseIE):
|
class YandexMusicAlbumIE(YandexMusicPlaylistBaseIE):
|
||||||
IE_NAME = 'yandexmusic:album'
|
IE_NAME = 'yandexmusic:album'
|
||||||
IE_DESC = 'Яндекс.Музыка - Альбом'
|
IE_DESC = 'Яндекс.Музыка - Альбом'
|
||||||
_VALID_URL = r'%s/album/(?P<id>\d+)/?(\?|$)' % YandexMusicBaseIE._VALID_URL_BASE
|
_VALID_URL = r'%s/album/(?P<id>\d+)' % YandexMusicBaseIE._VALID_URL_BASE
|
||||||
|
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'http://music.yandex.ru/album/540508',
|
'url': 'http://music.yandex.ru/album/540508',
|
||||||
@ -275,6 +275,10 @@ class YandexMusicAlbumIE(YandexMusicPlaylistBaseIE):
|
|||||||
'playlist_count': 187,
|
'playlist_count': 187,
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def suitable(cls, url):
|
||||||
|
return False if YandexMusicTrackIE.suitable(url) else super(YandexMusicAlbumIE, cls).suitable(url)
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
mobj = re.match(self._VALID_URL, url)
|
mobj = re.match(self._VALID_URL, url)
|
||||||
tld = mobj.group('tld')
|
tld = mobj.group('tld')
|
||||||
|
Loading…
Reference in New Issue
Block a user