From 4c91c4f146558684636c4f8121bccae6d813526b Mon Sep 17 00:00:00 2001 From: ckaotik Date: Fri, 19 Feb 2021 20:35:19 +0100 Subject: [PATCH] [mediathekviewweb] Register extractor --- youtube_dl/extractor/extractors.py | 4 ++++ youtube_dl/extractor/mediathekviewweb.py | 8 ++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py index 1a39c25c5..395aace8b 100644 --- a/youtube_dl/extractor/extractors.py +++ b/youtube_dl/extractor/extractors.py @@ -642,6 +642,10 @@ from .mediasite import ( MediasiteCatalogIE, MediasiteNamedCatalogIE, ) +from .mediathekviewweb import ( + MediathekViewWebSearchIE, + MediathekViewWebIE, +) from .medici import MediciIE from .megaphone import MegaphoneIE from .meipai import MeipaiIE diff --git a/youtube_dl/extractor/mediathekviewweb.py b/youtube_dl/extractor/mediathekviewweb.py index e96e5eb4d..b8a8fb8d8 100644 --- a/youtube_dl/extractor/mediathekviewweb.py +++ b/youtube_dl/extractor/mediathekviewweb.py @@ -165,14 +165,11 @@ class MediathekViewWebSearchIE(SearchInfoExtractor): headers={'Content-Type': 'text/plain'}) if results['err'] is not None: raise ExtractorError('API returned an error: %s' % results['err'][0]) - - meta = results['result']['queryInfo'] - print(json.dumps(meta)) - entries.extend(self._extract_playlist_entries(results['result']['results'])) + meta = results['result']['queryInfo'] # @todo This returns full pages: 100 results if 51 are requested. - if meta['resultCount'] == 0 or meta['resultCount'] + queryObject['offset'] >= n: + if len(entries) >= n or meta['resultCount'] == 0: break return self.playlist_result(entries, playlist_title=query) @@ -183,7 +180,6 @@ class MediathekViewWebIE(InfoExtractor): _VALID_URL = r'https?://mediathekviewweb\.de/\#query=(?P.+)' # @todo Specify test cases. - def _real_extract(self, url): query = self._match_id(url) search = compat_urllib_parse_unquote(query)