From 69d05fd2dea21cb4b1cd69c7ecc097e04a9e76a2 Mon Sep 17 00:00:00 2001 From: Dante Date: Thu, 2 Apr 2020 18:38:12 -0700 Subject: [PATCH] Valid_url_Troubleshoot --- youtube_dl/extractor/Sonuma.py | 51 ++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 youtube_dl/extractor/Sonuma.py diff --git a/youtube_dl/extractor/Sonuma.py b/youtube_dl/extractor/Sonuma.py new file mode 100644 index 000000000..1b1f64a4c --- /dev/null +++ b/youtube_dl/extractor/Sonuma.py @@ -0,0 +1,51 @@ +from __future__ import unicode_literals + +import re + + + + + +from .common import InfoExtractor + + + +class SonumaIE(InfoExtractor): + + _VALID_URL = r'(?:https?://)?(?:www\.)?sonuma\.be/archive/(?P\w+[-0-9])*)' + + + + def _real_extract(self, url): + + mobj=re.match(self._VALID_URL,url) + + + + video_id = mobj.group('id') + + webpage_url='https://sonuma.be/archive'+video_id + + webpage=self._download_webpage(webpage_url,video_id) + + + + self.report_extraction(video_id) + + + + video_url = self._html_search_regex('https://vod.infomaniak.com/redirect/sonumasa_2_vod/web2-39166/copy-32/cb88bd20-b57b-b756-e040-010a076419f5.mp4?sKey=1bc95ea22b94002d7a208593b7620d9f') + + + + return [{ + + 'id': video_id, + + 'url': video_url, + + 'ext': 'mp4', + + 'title': self._og_search_title(webpage), + + }] \ No newline at end of file