From cefecac12cd3c70f9c7a30992c60b05c2eb5d34e Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 2 Sep 2020 20:25:25 +0200 Subject: [skip travis] renaming to avoid using same folder when using pip install for example --- youtube_dlc/extractor/noz.py | 89 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 youtube_dlc/extractor/noz.py (limited to 'youtube_dlc/extractor/noz.py') diff --git a/youtube_dlc/extractor/noz.py b/youtube_dlc/extractor/noz.py new file mode 100644 index 000000000..ccafd7723 --- /dev/null +++ b/youtube_dlc/extractor/noz.py @@ -0,0 +1,89 @@ +# coding: utf-8 +from __future__ import unicode_literals + +from .common import InfoExtractor +from ..compat import ( + compat_urllib_parse_unquote, + compat_xpath, +) +from ..utils import ( + int_or_none, + find_xpath_attr, + xpath_text, + update_url_query, +) + + +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': r'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'