From 2594f3c2bdb6ef06d0cda0f86af1aabf1424b57e Mon Sep 17 00:00:00 2001 From: Pierre Mesure Date: Sun, 17 Mar 2024 07:48:58 +0100 Subject: [PATCH 1/3] Add support for shows.acast.com --- youtube_dl/extractor/acast.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/acast.py b/youtube_dl/extractor/acast.py index b9355a2c8..c8d0aae8b 100644 --- a/youtube_dl/extractor/acast.py +++ b/youtube_dl/extractor/acast.py @@ -48,7 +48,7 @@ class ACastIE(ACastBaseIE): _VALID_URL = r'''(?x) https?:// (?: - (?:(?:embed|www)\.)?acast\.com/| + (?:(?:embed|www|shows)\.)?acast\.com/| play\.acast\.com/s/ ) (?P[^/]+)/(?P[^/#?]+) @@ -77,6 +77,9 @@ class ACastIE(ACastBaseIE): }, { 'url': 'https://play.acast.com/s/sparpodcast/2a92b283-1a75-4ad8-8396-499c641de0d9', 'only_matching': True, + }, { + 'url': 'https://shows.acast.com/611233d8767fdf0012f22cb6/episodes/611233e4988b6a001394b5cf', + 'only_matching': True, }] def _real_extract(self, url): @@ -93,7 +96,7 @@ class ACastChannelIE(ACastBaseIE): _VALID_URL = r'''(?x) https?:// (?: - (?:www\.)?acast\.com/| + (?:www|shows\.)?acast\.com/| play\.acast\.com/s/ ) (?P[^/#?]+) @@ -109,6 +112,9 @@ class ACastChannelIE(ACastBaseIE): }, { 'url': 'http://play.acast.com/s/ft-banking-weekly', 'only_matching': True, + }, { + 'url': 'https://shows.acast.com/611233d8767fdf0012f22cb6', + 'only_matching': True, }] @classmethod From 3f45e4c12811f607db68ab1d513ded0053ae9583 Mon Sep 17 00:00:00 2001 From: Pierre Date: Fri, 29 Mar 2024 13:25:42 +0100 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: dirkf --- youtube_dl/extractor/acast.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/youtube_dl/extractor/acast.py b/youtube_dl/extractor/acast.py index c8d0aae8b..7ea4d153c 100644 --- a/youtube_dl/extractor/acast.py +++ b/youtube_dl/extractor/acast.py @@ -48,9 +48,9 @@ class ACastIE(ACastBaseIE): _VALID_URL = r'''(?x) https?:// (?: - (?:(?:embed|www|shows)\.)?acast\.com/| - play\.acast\.com/s/ - ) + (?:(?:(?Pembed)|www|shows)\.)?acast\.com| + play\.acast\.com/s + )/(?(embed)(?:$/)?) (?P[^/]+)/(?P[^/#?]+) ''' _TESTS = [{ @@ -96,7 +96,7 @@ class ACastChannelIE(ACastBaseIE): _VALID_URL = r'''(?x) https?:// (?: - (?:www|shows\.)?acast\.com/| + (?:(?:www|shows)\.)?acast\.com/| play\.acast\.com/s/ ) (?P[^/#?]+) From b91bbb8084ca39edebcfbc472e15a43ce584fdd0 Mon Sep 17 00:00:00 2001 From: Pierre Mesure Date: Fri, 29 Mar 2024 14:24:37 +0100 Subject: [PATCH 3/3] Edit tests --- youtube_dl/extractor/acast.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/youtube_dl/extractor/acast.py b/youtube_dl/extractor/acast.py index 7ea4d153c..b7d262530 100644 --- a/youtube_dl/extractor/acast.py +++ b/youtube_dl/extractor/acast.py @@ -107,6 +107,7 @@ class ACastChannelIE(ACastBaseIE): 'id': '4efc5294-5385-4847-98bd-519799ce5786', 'title': 'Today in Focus', 'description': 'md5:c09ce28c91002ce4ffce71d6504abaae', + 'skip': 'Error 404' }, 'playlist_mincount': 200, }, { @@ -115,6 +116,13 @@ class ACastChannelIE(ACastBaseIE): }, { '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