mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-01-10 21:40:11 +09:00
[mediathekviewweb] Register extractor
This commit is contained in:
parent
e17d20829b
commit
4c91c4f146
@ -642,6 +642,10 @@ from .mediasite import (
|
|||||||
MediasiteCatalogIE,
|
MediasiteCatalogIE,
|
||||||
MediasiteNamedCatalogIE,
|
MediasiteNamedCatalogIE,
|
||||||
)
|
)
|
||||||
|
from .mediathekviewweb import (
|
||||||
|
MediathekViewWebSearchIE,
|
||||||
|
MediathekViewWebIE,
|
||||||
|
)
|
||||||
from .medici import MediciIE
|
from .medici import MediciIE
|
||||||
from .megaphone import MegaphoneIE
|
from .megaphone import MegaphoneIE
|
||||||
from .meipai import MeipaiIE
|
from .meipai import MeipaiIE
|
||||||
|
@ -165,14 +165,11 @@ class MediathekViewWebSearchIE(SearchInfoExtractor):
|
|||||||
headers={'Content-Type': 'text/plain'})
|
headers={'Content-Type': 'text/plain'})
|
||||||
if results['err'] is not None:
|
if results['err'] is not None:
|
||||||
raise ExtractorError('API returned an error: %s' % results['err'][0])
|
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']))
|
entries.extend(self._extract_playlist_entries(results['result']['results']))
|
||||||
|
|
||||||
|
meta = results['result']['queryInfo']
|
||||||
# @todo This returns full pages: 100 results if 51 are requested.
|
# @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
|
break
|
||||||
|
|
||||||
return self.playlist_result(entries, playlist_title=query)
|
return self.playlist_result(entries, playlist_title=query)
|
||||||
@ -183,7 +180,6 @@ class MediathekViewWebIE(InfoExtractor):
|
|||||||
_VALID_URL = r'https?://mediathekviewweb\.de/\#query=(?P<id>.+)'
|
_VALID_URL = r'https?://mediathekviewweb\.de/\#query=(?P<id>.+)'
|
||||||
|
|
||||||
# @todo Specify test cases.
|
# @todo Specify test cases.
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
query = self._match_id(url)
|
query = self._match_id(url)
|
||||||
search = compat_urllib_parse_unquote(query)
|
search = compat_urllib_parse_unquote(query)
|
||||||
|
Loading…
Reference in New Issue
Block a user