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

Code before:
        data = self._download_json('https://10play.com.au/api/user/auth', video_id, 'Getting bearer token', headers={
            'X-Network-Ten-Auth': _auth_header,
        }, data=urlencode_postdata({
            'email': username,
            'password': password,
        }))
        return "Bearer " + data['jwt']['accessToken']

    def _real_extract(self, url):
        content_id = self._match_id(url)
        _token = self._get_bearer_token(content_id)
        data = self._download_json(
            'https://10play.com.au/api/v1/videos/' + content_id, content_id)
        _video_url = self._download_json(
            data.get('playbackApiEndpoint'), content_id, 'Downloading video JSON',
            headers={'Authorization': _token}).get('source')
        m3u8_url = self._request_webpage(HEADRequest(
            _video_url), content_id).geturl()
        if '10play-not-in-oz' in m3u8_url:
            self.raise_geo_restricted(countries=['AU'])
        formats = self._extract_m3u8_formats(m3u8_url, content_id, 'mp4')
        self._sort_formats(formats)

        return {
            'formats': formats,
            'id': data.get('altId'),
            'title': data.get('title'),
            'description': data.get('description'),
            'age_limit': self._AUS_AGES[data.get('classification')],
            'series': data.get('showName'),
            'season': data.get('showContentSeason'),
            'timestamp': data.get('published'),
            'thumbnail': data.get('imageUrl'),
            'uploader': 'Channel 10',
            'uploader_id': '2199827728001',
        }


Review comment (suggestion):
```suggestion
            'id': data.get('altId') or video_id,
```

Code after:
            'X-Network-Ten-Auth': _auth_header,
        }, data=urlencode_postdata({
            'email': username,
            'password': password,
        }))
        return "Bearer " + data['jwt']['accessToken']

    def _real_extract(self, url):
        content_id = self._match_id(url)
        _token = self._get_bearer_token(content_id)
        data = self._download_json(
            'https://10play.com.au/api/v1/videos/' + content_id, content_id)
        _video_url = self._download_json(
            data.get('playbackApiEndpoint'), content_id, 'Downloading video JSON',
            headers={'Authorization': _token}).get('source')
        m3u8_url = self._request_webpage(HEADRequest(
            _video_url), content_id).geturl()
        if '10play-not-in-oz' in m3u8_url:
            self.raise_geo_restricted(countries=['AU'])
        formats = self._extract_m3u8_formats(m3u8_url, content_id, 'mp4')
        self._sort_formats(formats)

        return {
            'formats': formats,
            'id': data.get('altId') or content_id,
            'title': data.get('title'),
            'description': data.get('description'),
            'age_limit': self._AUS_AGES[data.get('classification')],
            'series': data.get('showName'),
            'season': data.get('showContentSeason'),
            'timestamp': data.get('published'),
            'thumbnail': data.get('imageUrl'),
            'uploader': 'Channel 10',
            'uploader_id': '2199827728001',
        }