Compare commits

...

4 Commits

Author SHA1 Message Date
Pierre 9382361c65
Merge b91bbb8084 into e0727e4ab6 2024-04-07 17:00:17 +02:00
Pierre Mesure b91bbb8084 Edit tests 2024-03-29 14:24:37 +01:00
Pierre 3f45e4c128
Apply suggestions from code review
Co-authored-by: dirkf <fieldhouse@gmx.net>
2024-03-29 13:25:42 +01:00
Pierre Mesure 2594f3c2bd Add support for shows.acast.com 2024-03-17 07:49:19 +01:00
1 changed files with 18 additions and 4 deletions

View File

@ -48,9 +48,9 @@ class ACastIE(ACastBaseIE):
_VALID_URL = r'''(?x) _VALID_URL = r'''(?x)
https?:// https?://
(?: (?:
(?:(?:embed|www)\.)?acast\.com/| (?:(?:(?P<embed>embed)|www|shows)\.)?acast\.com|
play\.acast\.com/s/ play\.acast\.com/s
) )/(?(embed)(?:$/)?)
(?P<channel>[^/]+)/(?P<id>[^/#?]+) (?P<channel>[^/]+)/(?P<id>[^/#?]+)
''' '''
_TESTS = [{ _TESTS = [{
@ -77,6 +77,9 @@ class ACastIE(ACastBaseIE):
}, { }, {
'url': 'https://play.acast.com/s/sparpodcast/2a92b283-1a75-4ad8-8396-499c641de0d9', 'url': 'https://play.acast.com/s/sparpodcast/2a92b283-1a75-4ad8-8396-499c641de0d9',
'only_matching': True, 'only_matching': True,
}, {
'url': 'https://shows.acast.com/611233d8767fdf0012f22cb6/episodes/611233e4988b6a001394b5cf',
'only_matching': True,
}] }]
def _real_extract(self, url): def _real_extract(self, url):
@ -93,7 +96,7 @@ class ACastChannelIE(ACastBaseIE):
_VALID_URL = r'''(?x) _VALID_URL = r'''(?x)
https?:// https?://
(?: (?:
(?:www\.)?acast\.com/| (?:(?:www|shows)\.)?acast\.com/|
play\.acast\.com/s/ play\.acast\.com/s/
) )
(?P<id>[^/#?]+) (?P<id>[^/#?]+)
@ -104,11 +107,22 @@ class ACastChannelIE(ACastBaseIE):
'id': '4efc5294-5385-4847-98bd-519799ce5786', 'id': '4efc5294-5385-4847-98bd-519799ce5786',
'title': 'Today in Focus', 'title': 'Today in Focus',
'description': 'md5:c09ce28c91002ce4ffce71d6504abaae', 'description': 'md5:c09ce28c91002ce4ffce71d6504abaae',
'skip': 'Error 404'
}, },
'playlist_mincount': 200, 'playlist_mincount': 200,
}, { }, {
'url': 'http://play.acast.com/s/ft-banking-weekly', 'url': 'http://play.acast.com/s/ft-banking-weekly',
'only_matching': True, 'only_matching': True,
}, {
'url': 'https://shows.acast.com/611233d8767fdf0012f22cb6',
'only_matching': True,
}, {
'url': 'https://play.acast.com/s/getthebeltpod',
'info_dict': {
'id': '4caac858-3cda-44e6-b684-50d88b909c18',
'title': 'Get The Belt'
},
'playlist_mincount': 138,
}] }]
@classmethod @classmethod