From 413fb7b0c3b0d8add6852f21fcd3b608e6409744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Tue, 20 Oct 2020 10:38:03 +0300 Subject: [PATCH] [eventive] Add eventive extractor skeleton --- youtube_dl/extractor/eventive.py | 30 ++++++++++++++++++++++++++++++ youtube_dl/extractor/extractors.py | 1 + 2 files changed, 31 insertions(+) create mode 100644 youtube_dl/extractor/eventive.py diff --git a/youtube_dl/extractor/eventive.py b/youtube_dl/extractor/eventive.py new file mode 100644 index 000000000..2248c8a00 --- /dev/null +++ b/youtube_dl/extractor/eventive.py @@ -0,0 +1,30 @@ +# coding: utf-8 +from __future__ import unicode_literals +import re +from .common import InfoExtractor + +class EventiveIE(InfoExtractor): + SUBTITLE_DATE_RE = re.compile(r'\((\d{2}\.\d{2}\.\d{4}\s\d{2}:\d{2})\)$') + + _VALID_URL = r'https://watch\.eventive\.org/account/play/(?P[a-f\d+]{24})(?:\?m=1)?' + _TESTS = [ + { + 'note': 'Test Url from issue: https://github.com/ytdl-org/youtube-dl/issues/26619', + 'url': 'https://watch.eventive.org/account/play/5f0368a74282a70029055ca8', + 'md5': '', + 'info_dict': { + 'id': '5f0368a74282a70029055ca8', + 'ext': 'mp4', + 'title': 'TEST YOUR DEVICE COMPATIBILITY', + 'thumbnail': r're:https://eventive.imgix.net/.*\.jpg$', + } + }, + ] + + def _real_extract(self, url): + video_id = self._match_id(url) + + info = { + 'id': video_id, + } + return info diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py index ae7079a6a..290cd608b 100644 --- a/youtube_dl/extractor/extractors.py +++ b/youtube_dl/extractor/extractors.py @@ -327,6 +327,7 @@ from .espn import ( ) from .esri import EsriVideoIE from .europa import EuropaIE +from .eventive import EventiveIE from .everyonesmixtape import EveryonesMixtapeIE from .expotv import ExpoTVIE from .expressen import ExpressenIE