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

Code before:
            'playable_in_embed': True,
            'availability': 'public',
            'live_status': 'not_live',
        },
    }, {
        # data-plyr-embed-id="B1TZV8rNZoc" data-plyr-provider="youtube"
        'url': 'https://www.vnis.edu.vn',
        'info_dict': {
            'id': 'vnis.edu',
            'title': 'VNIS Education - Master Agent các Trường hàng đầu Bắc Mỹ',
            'description': 'md5:4dafcf7335bb018780e4426da8ab8e4e',
            'age_limit': 0,
            'thumbnail': 'https://vnis.edu.vn/wp-content/uploads/2021/05/ve-welcome-en.png',
            'timestamp': 1753233356,
            'upload_date': '20250723',
        },
        'playlist_count': 3,
    }]

    @classmethod
    def _extract_embed_urls(cls, url, webpage):
        plyr_embeds = re.finditer(
            r'<div[^>]+'
            r'(?:data-plyr-embed-id="(?P<id1>[^"]+)"[^>]+data-plyr-provider="(?P<provider1>[^"]+)"|'
            r'data-plyr-provider="(?P<provider2>[^"]+)"[^>]+data-plyr-embed-id="(?P<id2>[^"]+)")'
            r'[^>]*>', webpage)
        for mobj in plyr_embeds:
            embed_id = mobj.group('id1') or mobj.group('id2')
            provider = mobj.group('provider1') or mobj.group('provider2')
            if provider == 'vimeo':
                if not re.match(r'https?://', embed_id):
                    embed_id = f'https://player.vimeo.com/video/{embed_id}'
                yield VimeoIE._smuggle_referrer(embed_id, url)
            elif provider == 'youtube':
                if not re.match(r'https?://', embed_id):
                    embed_id = f'https://youtube.com/watch?v={embed_id}'
                yield embed_id


Review comment (suggestion):
```suggestion
        plyr_embeds = re.finditer(r'''(?x)
            <div[^>]+(?:
                data-plyr-embed-id="(?P<id1>[^"]+)"[^>]+data-plyr-provider="(?P<provider1>[^"]+)"|
                data-plyr-provider="(?P<provider2>[^"]+)"[^>]+data-plyr-embed-id="(?P<id2>[^"]+)"
            )[^>]*>''', webpage)
```

Code after:
            'playable_in_embed': True,
            'availability': 'public',
            'live_status': 'not_live',
        },
    }, {
        # data-plyr-embed-id="B1TZV8rNZoc" data-plyr-provider="youtube"
        'url': 'https://www.vnis.edu.vn',
        'info_dict': {
            'id': 'vnis.edu',
            'title': 'VNIS Education - Master Agent các Trường hàng đầu Bắc Mỹ',
            'description': 'md5:4dafcf7335bb018780e4426da8ab8e4e',
            'age_limit': 0,
            'thumbnail': 'https://vnis.edu.vn/wp-content/uploads/2021/05/ve-welcome-en.png',
            'timestamp': 1753233356,
            'upload_date': '20250723',
        },
        'playlist_count': 3,
    }]

    @classmethod
    def _extract_embed_urls(cls, url, webpage):
        plyr_embeds = re.finditer(r'''(?x)
            <div[^>]+(?:
                data-plyr-embed-id="(?P<id1>[^"]+)"[^>]+data-plyr-provider="(?P<provider1>[^"]+)"|
                data-plyr-provider="(?P<provider2>[^"]+)"[^>]+data-plyr-embed-id="(?P<id2>[^"]+)"
            )[^>]*>''', webpage)
        for mobj in plyr_embeds:
            embed_id = mobj.group('id1') or mobj.group('id2')
            provider = mobj.group('provider1') or mobj.group('provider2')
            if provider == 'vimeo':
                if not re.match(r'https?://', embed_id):
                    embed_id = f'https://player.vimeo.com/video/{embed_id}'
                yield VimeoIE._smuggle_referrer(embed_id, url)
            elif provider == 'youtube':
                if not re.match(r'https?://', embed_id):
                    embed_id = f'https://youtube.com/watch?v={embed_id}'
                yield embed_id