From c7bab7c39fd51c0812f70020172766303191bc01 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 5 May 2024 19:37:42 +0200 Subject: Adding upstream version 2023.03.04. Signed-off-by: Daniel Baumann --- yt_dlp/extractor/noz.py | 82 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 yt_dlp/extractor/noz.py (limited to 'yt_dlp/extractor/noz.py') diff --git a/yt_dlp/extractor/noz.py b/yt_dlp/extractor/noz.py new file mode 100644 index 0000000..59d259f --- /dev/null +++ b/yt_dlp/extractor/noz.py @@ -0,0 +1,82 @@ +from .common import InfoExtractor +from ..utils import ( + int_or_none, + find_xpath_attr, + xpath_text, + update_url_query, +) +from ..compat import compat_urllib_parse_unquote + + +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'