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

Code before:
from .common import InfoExtractor
from ..utils import ExtractorError


class NetAppBaseIE(InfoExtractor):
    _ACCOUNT_ID = '6255154784001'
    _VIDEO_METADATA_URL = 'https://api.media.netapp.com/client/detail/%s'
    _COLLECTION_METADATA_URL = 'https://api.media.netapp.com/client/collection/%s'
    _BC_URL = f'https://players.brightcove.net/{_ACCOUNT_ID}/default_default/index.html?videoId=%s'


class NetAppVideoIE(NetAppBaseIE):
    _VALID_URL = r'https?://media\.netapp\.com/video-detail/(?P<id>[0-9a-f-]+)'

    _TESTS = [{
        'url': 'https://media.netapp.com/video-detail/da25fc01-82ad-5284-95bc-26920200a222/seamless-storage-for-modern-kubernetes-deployments',
        'info_dict': {
            'id': '1843620950167202073',
            'ext': 'mp4',
            'title': 'Seamless storage for modern Kubernetes deployments',
            'description': 'md5:1ee39e315243fe71fb90af2796037248',
            'uploader_id': '6255154784001',
            'duration': 2159.41,
            'thumbnail': 'https://house-fastly-signed-us-east-1-prod.brightcovecdn.com/image/v1/static/6255154784001/70c1fa03-0e35-4527-bc1f-f1805546bf9a/6c7c327c-408e-4a98-9779-4a0b24708c86/1920x1080/match/image.jpg?fastly_token=NjkxZjNiOGZfYWUwZjc4YWMxZTdhM2I4NzY3MWUxYTVjMmY0OTg4NTQ5ZDkyNDg1YmZmZTg5NjRlNzRkYzIzY2FjZTY5NjlhZl9odHRwczovL2hvdXNlLWZhc3RseS1zaWduZWQtdXMtZWFzdC0xLXByb2QuYnJpZ2h0Y292ZWNkbi5jb20vaW1hZ2UvdjEvc3RhdGljLzYyNTUxNTQ3ODQwMDEvNzBjMWZhMDMtMGUzNS00NTI3LWJjMWYtZjE4MDU1NDZiZjlhLzZjN2MzMjdjLTQwOGUtNGE5OC05Nzc5LTRhMGIyNDcwOGM4Ni8xOTIweDEwODAvbWF0Y2gvaW1hZ2UuanBn',
            'tags': 'count:15',
            'timestamp': 1758213949,
            'upload_date': '20250918',
        },
    }, {
        'url': 'https://media.netapp.com/video-detail/45593e5d-cf1c-5996-978c-c9081906e69f/unleash-ai-innovation-with-your-data-with-the-netapp-platform',
        'only_matching': True,
    }]

    def _real_extract(self, url):

Review comment (suggestion):
Imo. it's not needed to add class variables for things that are only used a single time
```suggestion
    _BC_URL_TMPL = 'https://players.brightcove.net/6255154784001/default_default/index.html?videoId={}'
```

Code after:
from .brightcove import BrightcoveNewIE
from .common import InfoExtractor
from ..utils import parse_iso8601
from ..utils.traversal import require, traverse_obj


class NetAppBaseIE(InfoExtractor):
    _BC_URL = 'https://players.brightcove.net/6255154784001/default_default/index.html?videoId={}'

    @staticmethod
    def _parse_metadata(item):
        return traverse_obj(item, {
            'title': ('name', {str}),
            'description': ('description', {str}),
            'timestamp': ('createdAt', {parse_iso8601}),
        })


class NetAppVideoIE(NetAppBaseIE):
    _VALID_URL = r'https?://media\.netapp\.com/video-detail/(?P<id>[0-9a-f-]+)'

    _TESTS = [{
        'url': 'https://media.netapp.com/video-detail/da25fc01-82ad-5284-95bc-26920200a222/seamless-storage-for-modern-kubernetes-deployments',
        'info_dict': {
            'id': '1843620950167202073',
            'ext': 'mp4',
            'title': 'Seamless storage for modern Kubernetes deployments',
            'description': 'md5:1ee39e315243fe71fb90af2796037248',
            'uploader_id': '6255154784001',
            'duration': 2159.41,
            'thumbnail': r're:https://house-fastly-signed-us-east-1-prod\.brightcovecdn\.com/image/.*\.jpg',
            'tags': 'count:15',
            'timestamp': 1758213949,
            'upload_date': '20250918',