mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-02 06:27:21 +00:00
[ie/spreaker] enhancement: added support for podcast and feed pages
This commit is contained in:
parent
d1c4d88b2d
commit
7fff49c913
|
@ -1929,8 +1929,10 @@
|
|||
SpotifyShowIE,
|
||||
)
|
||||
from .spreaker import (
|
||||
SpreakerFeedPageIE,
|
||||
SpreakerIE,
|
||||
SpreakerPageIE,
|
||||
SpreakerPodcastPageIE,
|
||||
SpreakerShowIE,
|
||||
SpreakerShowPageIE,
|
||||
)
|
||||
|
|
|
@ -83,7 +83,9 @@ class SpreakerIE(InfoExtractor):
|
|||
'view_count': int,
|
||||
'like_count': int,
|
||||
'comment_count': int,
|
||||
'series': 'Success With Music (SWM)',
|
||||
'series': 'Success With Music | SWM',
|
||||
'thumbnail': r're:https?://.*\.jpg',
|
||||
'creators': ['SWM'],
|
||||
},
|
||||
}, {
|
||||
'url': 'https://api.spreaker.com/download/episode/12534508/swm_ep15_how_to_market_your_music_part_2.mp3',
|
||||
|
@ -102,6 +104,7 @@ def _real_extract(self, url):
|
|||
|
||||
|
||||
class SpreakerPageIE(InfoExtractor):
|
||||
# NOTE:the sample test doesnt work, need to futher investigate
|
||||
_VALID_URL = r'https?://(?:www\.)?spreaker\.com/user/[^/]+/(?P<id>[^/?#&]+)'
|
||||
_TESTS = [{
|
||||
'url': 'https://www.spreaker.com/user/9780658/swm-ep15-how-to-market-your-music-part-2',
|
||||
|
@ -156,6 +159,8 @@ 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<id>[^/?#&]+)'
|
||||
_TESTS = [{
|
||||
'url': 'https://www.spreaker.com/show/success-with-music',
|
||||
|
@ -170,3 +175,37 @@ def _real_extract(self, url):
|
|||
return self.url_result(
|
||||
f'https://api.spreaker.com/show/{show_id}',
|
||||
ie=SpreakerShowIE.ie_key(), video_id=show_id)
|
||||
|
||||
|
||||
class SpreakerPodcastPageIE(InfoExtractor):
|
||||
_VALID_URL = r'https?://(?:www\.)?spreaker\.com/podcast/[\w-]+--(?P<id>[\d]{3,})'
|
||||
_TESTS = [{
|
||||
'url': 'https://www.spreaker.com/podcast/health-wealth--5918323',
|
||||
'info_dict': {
|
||||
'id': '5918323',
|
||||
},
|
||||
'playlist_mincount': 60,
|
||||
}]
|
||||
|
||||
def _real_extract(self, url):
|
||||
show_id = self._match_id(url)
|
||||
return self.url_result(
|
||||
f'https://api.spreaker.com/show/{show_id}',
|
||||
ie=SpreakerShowIE.ie_key(), video_id=show_id)
|
||||
|
||||
|
||||
class SpreakerFeedPageIE(InfoExtractor):
|
||||
_VALID_URL = r'https?://(?:www\.)?spreaker\.com/show/(?P<id>[\d]+)/episodes/feed'
|
||||
_TESTS = [{
|
||||
'url': 'https://www.spreaker.com/show/5887186/episodes/feed',
|
||||
'info_dict': {
|
||||
'id': '5887186',
|
||||
},
|
||||
'playlist_mincount': 290,
|
||||
}]
|
||||
|
||||
def _real_extract(self, url):
|
||||
show_id = self._match_id(url)
|
||||
return self.url_result(
|
||||
f'https://api.spreaker.com/show/{show_id}',
|
||||
ie=SpreakerShowIE.ie_key(), video_id=show_id)
|
||||
|
|
Loading…
Reference in a new issue