From e187464c18eb19e91ba4125a96c934200b9ba30c Mon Sep 17 00:00:00 2001 From: Lucas Date: Sun, 18 Aug 2019 23:41:35 +0200 Subject: [PATCH] Add album extractor --- youtube_dl/extractor/deezer.py | 59 ++++++++++++++++++++++++++++++ youtube_dl/extractor/extractors.py | 5 ++- 2 files changed, 63 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/deezer.py b/youtube_dl/extractor/deezer.py index 6a21f2ffa..c5c7d6472 100644 --- a/youtube_dl/extractor/deezer.py +++ b/youtube_dl/extractor/deezer.py @@ -85,3 +85,62 @@ def _real_extract(self, url): 'thumbnail': playlist_thumbnail, 'entries': entries, } + +class DeezerAlbumIE(DeezerBaseInfoExtractor): + _VALID_URL = r'https?://(?:www\.)?deezer\.com/(../)?album/(?P[0-9]+)' + _TEST = { + 'url': 'https://www.deezer.com/fr/album/67505622', + 'info_dict': { + 'id': '67505622', + 'title': 'Last Week', + 'uploader': 'Home Brew', + 'thumbnail': r're:^https?://(e-)?cdns-images\.dzcdn\.net/images/cover/.*\.jpg$', + }, + 'playlist_count': 7, + } + + def _real_extract(self, url): + album_id, webpage, data = self.get_data(url) + + album_title = data.get('DATA').get('ALB_TITLE') + album_uploader = data.get('DATA').get('ART_NAME') + album_thumbnail = self._search_regex( + r'