aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimendum <timedum@gmail.com>2022-01-13 18:11:26 +0100
committerGitHub <noreply@github.com>2022-01-13 22:41:26 +0530
commit77b28f000a2cbe6f974e642ffb154c4bee325126 (patch)
tree990661d649d5b8136c1637611c5aaa298dd03c94
parentd57576b9d9e5a129131eb591b92bb5f26c92628b (diff)
downloadhypervideo-pre-77b28f000a2cbe6f974e642ffb154c4bee325126.tar.lz
hypervideo-pre-77b28f000a2cbe6f974e642ffb154c4bee325126.tar.xz
hypervideo-pre-77b28f000a2cbe6f974e642ffb154c4bee325126.zip
[dplay] Migrate DiscoveryPlusItaly to DiscoveryPlus (#2315)
Partially fixes #2138 Authored by: timendum
-rw-r--r--yt_dlp/extractor/dplay.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/yt_dlp/extractor/dplay.py b/yt_dlp/extractor/dplay.py
index e1f5e9dc8..6a245c1f0 100644
--- a/yt_dlp/extractor/dplay.py
+++ b/yt_dlp/extractor/dplay.py
@@ -575,16 +575,19 @@ class DiscoveryPlusShowBaseIE(DPlayBaseIE):
return self.playlist_result(self._entries(show_name), playlist_id=show_name)
-class DiscoveryPlusItalyIE(InfoExtractor):
+class DiscoveryPlusItalyIE(DiscoveryPlusIE):
_VALID_URL = r'https?://(?:www\.)?discoveryplus\.com/it/video' + DPlayBaseIE._PATH_REGEX
_TESTS = [{
'url': 'https://www.discoveryplus.com/it/video/i-signori-della-neve/stagione-2-episodio-1-i-preparativi',
'only_matching': True,
}]
+ _API_URL = 'eu1-prod-direct.discoveryplus.com'
+
def _real_extract(self, url):
- video_id = self._match_id(url)
- return self.url_result(f'https://discoveryplus.it/video/{video_id}', DPlayIE.ie_key(), video_id)
+ display_id = self._match_id(url)
+ return self._get_disco_api_info(
+ url, display_id, self._API_URL, 'dplay', 'it')
class DiscoveryPlusItalyShowIE(DiscoveryPlusShowBaseIE):