From bc0f68bee49a90b3d1edbaf6ecf34caa3b9755fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A9stin=20Reed?= Date: Fri, 26 Aug 2016 23:21:28 +0200 Subject: [PATCH] [Wenoo] Add new extractor (Closes #10087) --- youtube_dl/extractor/extractors.py | 1 + youtube_dl/extractor/wenoo.py | 33 ++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 youtube_dl/extractor/wenoo.py diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py index 8d88d6cb4..126ca74c6 100644 --- a/youtube_dl/extractor/extractors.py +++ b/youtube_dl/extractor/extractors.py @@ -1053,6 +1053,7 @@ from .webofstories import ( from .weiqitv import WeiqiTVIE from .wimp import WimpIE from .wistia import WistiaIE +from .wenoo import WenooIE from .worldstarhiphop import WorldStarHipHopIE from .wrzuta import ( WrzutaIE, diff --git a/youtube_dl/extractor/wenoo.py b/youtube_dl/extractor/wenoo.py new file mode 100644 index 000000000..3a88c800d --- /dev/null +++ b/youtube_dl/extractor/wenoo.py @@ -0,0 +1,33 @@ +from __future__ import unicode_literals + +from .common import InfoExtractor + + +class WenooIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?wenoo\.net/video/(?P[a-z0-9]+)' + _TEST = { + 'url': 'http://wenoo.net/video/1f1d1d434f90869367a', + 'md5': 'f41e3b237bc6612554dfa86779a536fd', + 'info_dict': { + 'id': '1f1d1d434f90869367a', + 'ext': 'mp4', + 'title': '[Reupload] Avatar Korra\'s retarded day - 500 Subscriber Milestone video -HD 720p-', + 'description': 'md5:98eabca037057bf4ad529d4fdc3f067b', + 'thumbnail': 're:^http://.*\.jpg$', + } + } + + def _real_extract(self, url): + video_id = self._match_id(url) + webpage = self._download_webpage(url, video_id) + + formats = self._parse_html5_media_entries(url, + webpage, video_id)[0]['formats'] + + return { + 'id': video_id, + 'title': self._og_search_title(webpage), + 'formats': formats, + 'description': self._og_search_description(webpage), + 'thumbnail': self._og_search_thumbnail(webpage), + }