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

Code before:
        },
        'params': {
            'skip_download': True,
        },
    }, {
        'url': 'https://www.aph.gov.au/News_and_Events/Watch_Read_Listen/ParlView/video/SV1394.dv',
        'info_dict': {
            'id': 'SV1394.dv',
            'ext': 'mp4',
            'title': 'Senate Select Committee on Uranium Mining and Milling [Part 1]',
            'description': 'Official Recording of Senate Committee Proceedings from the Australian Parliament',
            'thumbnail': 'https://aphbroadcasting-prod.z01.azurefd.net/vod-storage/vod-logos/CommitteeThumbnail06.jpg',
            'upload_date': '19960822',
            'duration': 14765,
            'timestamp': 840754200,
        },
        'params': {
            'skip_download': True,
        },
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)
        api_data = self._download_json(f'https://vodapi.aph.gov.au/api/search/parlview/{video_id}', video_id)

        video_details = traverse_obj(api_data, ('videoDetails', {dict}))

        formats, subtitles = self._extract_m3u8_formats_and_subtitles(
            video_details['files']['file']['url'], video_id, 'mp4')

        DURATION_RE = re.compile(r'(?P<duration>\d+:\d+:\d+):\d+')

        return {
            'id': video_id,
            'formats': formats,
            'subtitles': subtitles,
            **traverse_obj(video_details, {
                'title': (('parlViewTitle', 'title'), {str}, any),
                'description': ('parlViewDescription', {str}),
                'duration': ('files', 'file', 'duration', {DURATION_RE.fullmatch}, 'duration', {parse_duration}),
                'timestamp': ('recordingFrom', {parse_iso8601}),
                'thumbnail': ('thumbUrl', {url_or_none}),
            }),
        }


Review comment (suggestion):
This can be fatal. There is nothing useful we can do without this data.
```suggestion
        video_details = self._download_json(
            f'https://vodapi.aph.gov.au/api/search/parlview/{video_id}', video_id)['videoDetails']
```

Code after:
        'url': 'https://www.aph.gov.au/News_and_Events/Watch_Read_Listen/ParlView/video/SV1394.dv',
        'info_dict': {
            'id': 'SV1394.dv',
            'ext': 'mp4',
            'title': 'Senate Select Committee on Uranium Mining and Milling [Part 1]',
            'description': 'Official Recording of Senate Committee Proceedings from the Australian Parliament',
            'thumbnail': 'https://aphbroadcasting-prod.z01.azurefd.net/vod-storage/vod-logos/CommitteeThumbnail06.jpg',
            'upload_date': '19960822',
            'duration': 14765,
            'timestamp': 840754200,
        },
        'params': {
            'skip_download': True,
        },
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)
        video_details = self._download_json(
            f'https://vodapi.aph.gov.au/api/search/parlview/{video_id}', video_id)['videoDetails']

        formats, subtitles = self._extract_m3u8_formats_and_subtitles(
            video_details['files']['file']['url'], video_id, 'mp4')

        DURATION_RE = re.compile(r'(?P<duration>\d+:\d+:\d+):\d+')

        return {
            'id': video_id,
            'formats': formats,
            'subtitles': subtitles,
            **traverse_obj(video_details, {
                'title': (('parlViewTitle', 'title'), {str}, any),
                'description': ('parlViewDescription', {str}),
                'duration': ('files', 'file', 'duration', {DURATION_RE.fullmatch}, 'duration', {parse_duration}),
                'timestamp': ('recordingFrom', {parse_iso8601}),
                'thumbnail': ('thumbUrl', {url_or_none}),
            }),
        }