[spreaker] new url schemes

merge-requests/5/head
Lauren Liberda 2021-04-12 14:33:51 +02:00
parent abb792e7b5
commit a4d58a6adf
1 changed files with 15 additions and 4 deletions

View File

@ -64,11 +64,16 @@ def _extract_episode(data, episode_id=None):
class SpreakerIE(InfoExtractor):
_VALID_URL = r'''(?x)
https?://
api\.spreaker\.com/
(?:(?:api|widget|www)\.)?spreaker\.com/
(?:
(?:download/)?episode|
v2/episodes
)/
(?:
(?:download/)?episode|
v2/episodes
)/
|(?:
player\?(?:.+?&)?episode_id=
)
)
(?P<id>\d+)
'''
_TESTS = [{
@ -95,6 +100,12 @@ class SpreakerIE(InfoExtractor):
}, {
'url': 'https://api.spreaker.com/v2/episodes/12534508?export=episode_segments',
'only_matching': True,
}, {
'url': 'https://www.spreaker.com/episode/44098221',
'only_matching': True,
}, {
'url': 'https://widget.spreaker.com/player?episode_id=44098221',
'only_matching': True,
}]
def _real_extract(self, url):