diff --git a/youtube_dl/extractor/deezer.py b/youtube_dl/extractor/deezer.py index d0e553f5a..3031671c1 100644 --- a/youtube_dl/extractor/deezer.py +++ b/youtube_dl/extractor/deezer.py @@ -17,9 +17,9 @@ def get_data(self, url): self._downloader.report_warning('For now, this extractor only supports the 30 second previews. Patches welcome!') mobj = re.match(self._VALID_URL, url) - id = mobj.group('id') + data_id = mobj.group('id') - webpage = self._download_webpage(url, id) + webpage = self._download_webpage(url, data_id) geoblocking_msg = self._html_search_regex( r'
(.*?)
', webpage, 'geoblocking message', default=None) @@ -32,7 +32,7 @@ def get_data(self, url): r'naboo\.display\(\'[^\']+\',\s*(.*?)\);\n'), webpage, 'data JSON') data = json.loads(data_json) - return id, webpage, data + return data_id, webpage, data class DeezerPlaylistIE(DeezerBaseInfoExtractor): @@ -51,17 +51,17 @@ class DeezerPlaylistIE(DeezerBaseInfoExtractor): def _real_extract(self, url): playlist_id, webpage, data = self.get_data(url) - playlist_title = data.get('DATA').get('TITLE') - playlist_uploader = data.get('DATA').get('PARENT_USERNAME') + playlist_title = data.get('DATA', {}).get('TITLE') + playlist_uploader = data.get('DATA', {}).get('PARENT_USERNAME') playlist_thumbnail = self._search_regex( r'