From: Philipp Hagemeister Date: Sun, 14 Feb 2016 23:07:16 +0000 (+0100) Subject: [noz] Add new extractor X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=youtube-dl.git;a=commitdiff_plain;h=a517bb4b1e3eaea67973ee6a0718f2f4cf2b760e [noz] Add new extractor --- diff --git a/youtube_dl/extractor/__init__.py b/youtube_dl/extractor/__init__.py index 6937f28d3..a02113c86 100644 --- a/youtube_dl/extractor/__init__.py +++ b/youtube_dl/extractor/__init__.py @@ -490,6 +490,7 @@ from .nowtv import ( NowTVIE, NowTVListIE, ) +from .noz import NozIE from .npo import ( NPOIE, NPOLiveIE, diff --git a/youtube_dl/extractor/noz.py b/youtube_dl/extractor/noz.py new file mode 100644 index 000000000..0ffb44b47 --- /dev/null +++ b/youtube_dl/extractor/noz.py @@ -0,0 +1,69 @@ +# coding: utf-8 +from __future__ import unicode_literals + +from .common import InfoExtractor +from ..compat import compat_urllib_parse_unquote +from ..utils import ( + int_or_none, + xpath_text, +) + + +class NozIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?noz\.de/video/(?P[0-9]+)/' + _TESTS = [{ + 'url': 'http://www.noz.de/video/25151/32-Deutschland-gewinnt-Badminton-Lnderspiel-in-Melle', + 'info_dict': { + 'id': '25151', + 'ext': 'mp4', + 'duration': 215, + 'title': '3:2 - Deutschland gewinnt Badminton-Länderspiel in Melle', + 'description': 'Vor rund 370 Zuschauern gewinnt die deutsche Badminton-Nationalmannschaft am Donnerstag ein EM-Vorbereitungsspiel gegen Frankreich in Melle. Video Moritz Frankenberg.', + 'thumbnail': 're:^http://.*\.jpg', + }, + }] + + def _real_extract(self, url): + video_id = self._match_id(url) + webpage = self._download_webpage(url, video_id) + description = self._og_search_description(webpage) + + edge_url = self._html_search_regex( + r'