From 794e3d372ce2a3cb982381de1106eeb2cf7121ce Mon Sep 17 00:00:00 2001 From: subrat-lima Date: Tue, 10 Sep 2024 15:55:14 +0530 Subject: [PATCH] [ie/spreaker] fixed SpreakerShowPageIE extractor --- yt_dlp/extractor/spreaker.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/yt_dlp/extractor/spreaker.py b/yt_dlp/extractor/spreaker.py index 8202f4a0eb..3e2084a166 100644 --- a/yt_dlp/extractor/spreaker.py +++ b/yt_dlp/extractor/spreaker.py @@ -159,26 +159,26 @@ def _real_extract(self, url): class SpreakerShowPageIE(InfoExtractor): - # NOTE:the sample test doesnt work, need to futher investigate - # layout has changed - _VALID_URL = r'https?://(?:www\.)?spreaker\.com/show/(?P[^/?#&]+)' + _VALID_URL = r'https?://(?:www\.)?spreaker\.com/show/(?P[^/?#&]+)(?!/episodes/feed)' _TESTS = [{ 'url': 'https://www.spreaker.com/show/success-with-music', - 'only_matching': True, + 'info_dict': { + 'id': '2317431', + }, + 'playlist_mincount': 30, }] def _real_extract(self, url): display_id = self._match_id(url) webpage = self._download_webpage(url, display_id) - show_id = self._search_regex( - r'show_id\s*:\s*(?P\d+)', webpage, 'show id') + redirect_url = self._og_search_property('url', webpage, 'redirect url') return self.url_result( - f'https://api.spreaker.com/show/{show_id}', - ie=SpreakerShowIE.ie_key(), video_id=show_id) + redirect_url, + SpreakerPodcastPageIE) class SpreakerPodcastPageIE(InfoExtractor): - _VALID_URL = r'https?://(?:www\.)?spreaker\.com/podcast/[\w-]+--(?P[\d]{3,})' + _VALID_URL = r'https?://(?:www\.)?spreaker\.com/podcast/[\w-]+--(?P[\d]+)' _TESTS = [{ 'url': 'https://www.spreaker.com/podcast/health-wealth--5918323', 'info_dict': {