mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-02 14:37:21 +00:00
[ie/spreaker] fixed SpreakerShowPageIE extractor
This commit is contained in:
parent
7fff49c913
commit
794e3d372c
|
@ -159,26 +159,26 @@ def _real_extract(self, url):
|
||||||
|
|
||||||
|
|
||||||
class SpreakerShowPageIE(InfoExtractor):
|
class SpreakerShowPageIE(InfoExtractor):
|
||||||
# NOTE:the sample test doesnt work, need to futher investigate
|
_VALID_URL = r'https?://(?:www\.)?spreaker\.com/show/(?P<id>[^/?#&]+)(?!/episodes/feed)'
|
||||||
# layout has changed
|
|
||||||
_VALID_URL = r'https?://(?:www\.)?spreaker\.com/show/(?P<id>[^/?#&]+)'
|
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'https://www.spreaker.com/show/success-with-music',
|
'url': 'https://www.spreaker.com/show/success-with-music',
|
||||||
'only_matching': True,
|
'info_dict': {
|
||||||
|
'id': '2317431',
|
||||||
|
},
|
||||||
|
'playlist_mincount': 30,
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
display_id = self._match_id(url)
|
display_id = self._match_id(url)
|
||||||
webpage = self._download_webpage(url, display_id)
|
webpage = self._download_webpage(url, display_id)
|
||||||
show_id = self._search_regex(
|
redirect_url = self._og_search_property('url', webpage, 'redirect url')
|
||||||
r'show_id\s*:\s*(?P<id>\d+)', webpage, 'show id')
|
|
||||||
return self.url_result(
|
return self.url_result(
|
||||||
f'https://api.spreaker.com/show/{show_id}',
|
redirect_url,
|
||||||
ie=SpreakerShowIE.ie_key(), video_id=show_id)
|
SpreakerPodcastPageIE)
|
||||||
|
|
||||||
|
|
||||||
class SpreakerPodcastPageIE(InfoExtractor):
|
class SpreakerPodcastPageIE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://(?:www\.)?spreaker\.com/podcast/[\w-]+--(?P<id>[\d]{3,})'
|
_VALID_URL = r'https?://(?:www\.)?spreaker\.com/podcast/[\w-]+--(?P<id>[\d]+)'
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'https://www.spreaker.com/podcast/health-wealth--5918323',
|
'url': 'https://www.spreaker.com/podcast/health-wealth--5918323',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
|
|
Loading…
Reference in a new issue