diff options
author | Tobias Kunze <rixx@cutebit.de> | 2017-10-27 13:22:13 +0200 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2019-04-28 23:07:01 +0700 |
commit | ae8c13565eaed326179b26a91a1b0c3179eb3d07 (patch) | |
tree | 6c9434855a3fd2494a6d44f078c9b7c4d44e84d7 /youtube_dl/extractor/ccc.py | |
parent | 280913800dff225d7171ccdbe09d7ce01fdf5d3f (diff) |
[ccc:playlist] Add extractor
Diffstat (limited to 'youtube_dl/extractor/ccc.py')
-rw-r--r-- | youtube_dl/extractor/ccc.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/youtube_dl/extractor/ccc.py b/youtube_dl/extractor/ccc.py index 734702144..a4fdf74e8 100644 --- a/youtube_dl/extractor/ccc.py +++ b/youtube_dl/extractor/ccc.py @@ -75,3 +75,27 @@ class CCCIE(InfoExtractor): 'tags': event_data.get('tags'), 'formats': formats, } + + +class CCCPlaylistIE(InfoExtractor): + IE_NAME = 'media.ccc.de:lists' + _VALID_URL = r'https?://(?:www\.)?media\.ccc\.de/c/(?P<id>[^/?#&]+)' + _TESTS = [{ + 'url': 'https://media.ccc.de/c/30c3', + 'info_dict': { + 'title': '30C3', + 'id': '30c3', + }, + 'playlist_count': 135, + }] + + def _real_extract(self, url): + acronym = self._match_id(url).lower() + + conf = self._download_json('https://media.ccc.de/public/conferences/' + acronym, acronym) + + return self.playlist_result( + [self.url_result(event['frontend_link']) for event in conf['events']], + acronym, + conf['title'], + ) |