From b4cbc9e7ced65e71eb4c74f3c7eee2894eace1da Mon Sep 17 00:00:00 2001 From: mimvahedi Date: Wed, 13 Dec 2023 01:08:07 +0330 Subject: [PATCH] [alaa] fix playlist extraction --- youtube_dl/extractor/alaa.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/alaa.py b/youtube_dl/extractor/alaa.py index bd66d1b34..148889ef6 100644 --- a/youtube_dl/extractor/alaa.py +++ b/youtube_dl/extractor/alaa.py @@ -68,5 +68,14 @@ class AlaaPlaylistIE(InfoExtractor): set_id = self._match_id(url) set_data = self._download_json('https://alaatv.com/api/v2/set/{0}'.format(set_id), set_id) set_title = set_data['data']['title'] - set_content = list(map(lambda x: x['url']['web'], set_data['data']['contents'])) + + def map_formats(v): + return { + 'id': str(v['id']), + 'title': v['title'], + 'url': v['url']['web'], + } + + set_content = list(map(map_formats, set_data['data']['contents'])) + return self.playlist_result(set_content, set_id, set_title)