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

Code before:
        },
    }, {
        'url': 'https://www.tvo.org/video/documentaries/valentines-day',
        'info_dict': {
            'id': '6387298331112',
            'ext': 'mp4',
            'title': 'Valentine\'s Day',
            'categories': ['Documentaries'],
            'description': 'md5:b142149beb2d3a855244816c50cd2f14',
            'display_id': 'valentines-day',
            'duration': 3121,
            'episode': 'Valentine\'s Day',
            'episode_id': 'valentines-day',
            'episode_number': 2,
            'season': 'Season 1',
            'season_number': 1,
            'series': 'How We Celebrate',
            'series_id': 'how-we-celebrate',
            'tags': 'count:6',
            'thumbnail': r're:https?://.+',
            'timestamp': 1770386416,
            'upload_date': '20260206',
            'uploader_id': '18140038001',
        },
    }]
    BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/18140038001/default_default/index.html?videoId=%s'

    def _real_extract(self, url):
        display_id = self._match_id(url)
        video_data = self._download_json(
            'https://hmy0rc1bo2.execute-api.ca-central-1.amazonaws.com/graphql',
            display_id, headers={'Content-Type': 'application/json'},
            data=json.dumps({
                'operationName': 'getVideo',
                'variables': {'slug': urllib.parse.urlparse(url).path.rstrip('/')},
                'query': '''query getVideo($slug: String) {
                  getTVOOrgVideo(slug: $slug) {
                    contentCategory
                    description
                    length
                    program {
                      nodeUrl
                      title
                    }
                    programOrder
                    publishedAt
                    season
                    tags
                    thumbnail
                    title
                    videoSource {

Review comment (suggestion):
```suggestion
    BRIGHTCOVE_URL_TEMPLATE = 'https://players.brightcove.net/18140038001/default_default/index.html?videoId=%s'
```

Code after:
        },
    }, {
        'url': 'https://www.tvo.org/video/documentaries/valentines-day',
        'info_dict': {
            'id': '6387298331112',
            'ext': 'mp4',
            'title': 'Valentine\'s Day',
            'categories': ['Documentaries'],
            'description': 'md5:b142149beb2d3a855244816c50cd2f14',
            'display_id': 'valentines-day',
            'duration': 3121,
            'episode': 'Valentine\'s Day',
            'episode_id': 'valentines-day',
            'episode_number': 2,
            'season': 'Season 1',
            'season_number': 1,
            'series': 'How We Celebrate',
            'series_id': 'how-we-celebrate',
            'tags': 'count:6',
            'thumbnail': r're:https?://.+',
            'timestamp': 1770386416,
            'upload_date': '20260206',
            'uploader_id': '18140038001',
        },
    }]
    BRIGHTCOVE_URL_TEMPLATE = 'https://players.brightcove.net/18140038001/default_default/index.html?videoId=%s'

    def _real_extract(self, url):
        display_id = self._match_id(url)
        video_data = self._download_json(
            'https://hmy0rc1bo2.execute-api.ca-central-1.amazonaws.com/graphql',
            display_id, headers={'Content-Type': 'application/json'},
            data=json.dumps({
                'operationName': 'getVideo',
                'variables': {'slug': urllib.parse.urlparse(url).path.rstrip('/')},
                'query': '''query getVideo($slug: String) {
                  getTVOOrgVideo(slug: $slug) {
                    contentCategory
                    description
                    length
                    program {
                      nodeUrl
                      title
                    }
                    programOrder
                    publishedAt
                    season
                    tags
                    thumbnail
                    title
                    videoSource {