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

Code before:
from .common import InfoExtractor
from ..utils import (
    clean_html,
    float_or_none,
    int_or_none,
    str_or_none,
    traverse_obj,
    unified_timestamp
)


class AnchorFMEpisodeIE(InfoExtractor):
    _VALID_URL = r'https?://anchor\.fm/(?P<channel_name>\w+)/(?:embed/)?episodes/[\w-]+-(?P<episode_id>\w+)'
    _EMBED_REGEX = [
        '<iframe[^>]+src=[\'"](?P<url>[^"]+)'
    ]
    _TESTS = [{
        'url': 'https://anchor.fm/lovelyti/episodes/Chrisean-Rock-takes-to-twitter-to-announce-shes-pregnant--Blueface-denies-he-is-the-father-e1tpt3d',
        'info_dict': {
            'id': 'e1tpt3d',
            'ext': 'mp3',
            'title': ' Chrisean Rock takes to twitter to announce she\'s pregnant, Blueface denies he is the father!',
            'description': 'md5:207d167de3e28ceb4ddc1ebf5a30044c',
            'thumbnail': 'https://s3-us-west-2.amazonaws.com/anchor-generated-image-bank/production/podcast_uploaded_nologo/1034827/1034827-1658438968460-5f3bfdf3601e8.jpg',
            'duration': 624.718,
            'uploader': 'Lovelyti ',
            'uploader_id': '991541',
            'channel': 'lovelyti',
            'modified_date': '20230121',
            'modified_timestamp': 1674285178,
            'release_date': '20230121',
            'release_timestamp': 1674285179,
            'episode_id': 'e1tpt3d',
        }
    }, {
        # embed url
        'url': 'https://anchor.fm/apakatatempo/embed/episodes/S2E75-Perang-Bintang-di-Balik-Kasus-Ferdy-Sambo-dan-Ismail-Bolong-e1shjqd',
        'info_dict': {
            'id': 'e1shjqd',
            'ext': 'mp3',
            'title': 'S2E75 Perang Bintang di Balik Kasus Ferdy Sambo dan Ismail Bolong',

Review comment (suggestion):
```suggestion
    _EMBED_REGEX = [rf'<iframe[^>]+\bsrc=[\'"](?P<url>{_VALID_URL})']
```

Code after:
from .common import InfoExtractor
from ..utils import (
    clean_html,
    float_or_none,
    int_or_none,
    str_or_none,
    traverse_obj,
    unified_timestamp
)


class AnchorFMEpisodeIE(InfoExtractor):
    _VALID_URL = r'https?://anchor\.fm/(?P<channel_name>\w+)/(?:embed/)?episodes/[\w-]+-(?P<episode_id>\w+)'
    _EMBED_REGEX = [rf'<iframe[^>]+\bsrc=[\'"](?P<url>{_VALID_URL})']
    _TESTS = [{
        'url': 'https://anchor.fm/lovelyti/episodes/Chrisean-Rock-takes-to-twitter-to-announce-shes-pregnant--Blueface-denies-he-is-the-father-e1tpt3d',
        'info_dict': {
            'id': 'e1tpt3d',
            'ext': 'mp3',
            'title': ' Chrisean Rock takes to twitter to announce she\'s pregnant, Blueface denies he is the father!',
            'description': 'md5:207d167de3e28ceb4ddc1ebf5a30044c',
            'thumbnail': 'https://s3-us-west-2.amazonaws.com/anchor-generated-image-bank/production/podcast_uploaded_nologo/1034827/1034827-1658438968460-5f3bfdf3601e8.jpg',
            'duration': 624.718,
            'uploader': 'Lovelyti ',
            'uploader_id': '991541',
            'channel': 'lovelyti',
            'modified_date': '20230121',
            'modified_timestamp': 1674285178,
            'release_date': '20230121',
            'release_timestamp': 1674285179,
            'episode_id': 'e1tpt3d',
        }
    }, {
        # embed url
        'url': 'https://anchor.fm/apakatatempo/embed/episodes/S2E75-Perang-Bintang-di-Balik-Kasus-Ferdy-Sambo-dan-Ismail-Bolong-e1shjqd',
        'info_dict': {
            'id': 'e1shjqd',
            'ext': 'mp3',
            'title': 'S2E75 Perang Bintang di Balik Kasus Ferdy Sambo dan Ismail Bolong',
            'description': 'md5:9e95ad9293bf00178bf8d33e9cb92c41',
            'duration': 1042.008,