Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/acast.py (Python)

Code before:
            'episode': title,
            'episode_number': int_or_none(episode.get('episode')),
        }
        info.update(show_info)
        return info

    def _extract_show_info(self, show):
        return {
            'creator': show.get('author'),
            'series': show.get('title'),
        }

    def _call_api(self, path, video_id, query=None):
        return self._download_json(
            'https://feeder.acast.com/api/v1/shows/' + path, video_id, query=query)


class ACastIE(ACastBaseIE):
    IE_NAME = 'acast'
    _VALID_URL = r'''(?x:
                    https?://
                        (?:
                            (?:(?:embed|www|shows)\.)?acast\.com/|
                            play\.acast\.com/s/
                        )
                        (?P<channel>[^/]+)/(?:episodes/)?(?P<id>[^/#?"]+)
                    )'''
    _EMBED_REGEX = [rf'(?x)<iframe[^>]+\bsrc=[\'"](?P<url>{_VALID_URL})']
    _TESTS = [{
        'url': 'https://shows.acast.com/sparpodcast/episodes/2.raggarmordet-rosterurdetforflutna',
        'info_dict': {
            'id': '2a92b283-1a75-4ad8-8396-499c641de0d9',
            'ext': 'mp3',
            'title': '2. Raggarmordet - Röster ur det förflutna',
            'description': 'md5:013959207e05011ad14a222cf22278cc',
            'timestamp': 1477346700,
            'upload_date': '20161024',
            'duration': 2766,
            'creators': ['Third Ear Studio'],
            'series': 'Spår',
            'episode': '2. Raggarmordet - Röster ur det förflutna',
            'thumbnail': 'https://assets.pippa.io/shows/616ebe1886d7b1398620b943/616ebe33c7e6e70013cae7da.jpg',
            'episode_number': 2,
            'display_id': '2.raggarmordet-rosterurdetforflutna',
            'season_number': 4,
            'season': 'Season 4',
        },
    }, {
        'url': 'http://embed.acast.com/adambuxton/ep.12-adam-joeschristmaspodcast2015',
        'only_matching': True,
    }, {

Review comment (suggestion):
I know this is old code, but I'm always gonna fix it when I see it
```suggestion
                        (?P<channel>[^/?#]+)/(?:episodes/)?(?P<id>[^/#?"]+)
```

Code after:
            'episode': title,
            'episode_number': int_or_none(episode.get('episode')),
        }
        info.update(show_info)
        return info

    def _extract_show_info(self, show):
        return {
            'creator': show.get('author'),
            'series': show.get('title'),
        }

    def _call_api(self, path, video_id, query=None):
        return self._download_json(
            'https://feeder.acast.com/api/v1/shows/' + path, video_id, query=query)


class ACastIE(ACastBaseIE):
    IE_NAME = 'acast'
    _VALID_URL = r'''(?x:
                    https?://
                        (?:
                            (?:(?:embed|www|shows)\.)?acast\.com/|
                            play\.acast\.com/s/
                        )
                        (?P<channel>[^/?#]+)/(?:episodes/)?(?P<id>[^/#?"]+)
                    )'''
    _EMBED_REGEX = [rf'(?x)<iframe[^>]+\bsrc=[\'"](?P<url>{_VALID_URL})']
    _TESTS = [{
        'url': 'https://shows.acast.com/sparpodcast/episodes/2.raggarmordet-rosterurdetforflutna',
        'info_dict': {
            'id': '2a92b283-1a75-4ad8-8396-499c641de0d9',
            'ext': 'mp3',
            'title': '2. Raggarmordet - Röster ur det förflutna',
            'description': 'md5:013959207e05011ad14a222cf22278cc',
            'timestamp': 1477346700,
            'upload_date': '20161024',
            'duration': 2766,
            'creators': ['Third Ear Studio'],
            'series': 'Spår',
            'episode': '2. Raggarmordet - Röster ur det förflutna',
            'thumbnail': 'https://assets.pippa.io/shows/616ebe1886d7b1398620b943/616ebe33c7e6e70013cae7da.jpg',
            'episode_number': 2,
            'display_id': '2.raggarmordet-rosterurdetforflutna',
            'season_number': 4,
            'season': 'Season 4',
        },
    }, {
        'url': 'http://embed.acast.com/adambuxton/ep.12-adam-joeschristmaspodcast2015',
        'only_matching': True,
    }, {