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

Code before:

        password = self.get_param('videopassword')

        headers = {'Accept': 'application/json'}
        if password:
            headers['accessPwd'] = password

        stream, urlh = self._download_json_handle(
            'https://%s.webex.com/webappng/api/v1/recordings/%s/stream' % (subdomain, video_id),
            video_id, headers=headers, query={'siteurl': siteurl}, expected_status=(403, 429))

        if urlh.status == 403:
            if stream['code'] == 53004:
                self.raise_login_required(method='cookies')
            if stream['code'] == 53005:
                if not password:
                    raise ExtractorError(
                        'This video is protected by a password, use the --video-password option', expected=True)
                raise ExtractorError('Wrong password', expected=True)
            raise ExtractorError(f"{self.IE_NAME} said: {stream['code']} - {stream['message']}", expected=True)

        if urlh.status == 429:
            raise ExtractorError(
                f'{self.IE_NAME} asks you to solve a CAPTCHA. Login with browser, '
                'solve CAPTCHA, then export cookies and pass cookie file to '
                'yt-dlp with --cookies.', expected=True)

        video_id = stream.get('recordUUID') or video_id

        formats = [{
            'format_id': 'video',
            'url': stream['fallbackPlaySrc'],
            'ext': 'mp4',
            'vcodec': 'avc1.640028',
            'acodec': 'mp4a.40.2',
        }]
        if stream.get('preventDownload') is False:
            mp4url = try_get(stream, lambda x: x['downloadRecordingInfo']['downloadInfo']['mp4URL'])
            if mp4url:
                formats.append({
                    'format_id': 'video',
                    'url': mp4url,
                    'ext': 'mp4',
                    'vcodec': 'avc1.640028',
                    'acodec': 'mp4a.40.2',
                })
            audiourl = try_get(stream, lambda x: x['downloadRecordingInfo']['downloadInfo']['audioURL'])
            if audiourl:
                formats.append({
                    'format_id': 'audio',
                    'url': audiourl,

Review comment (suggestion):
```suggestion
            self.raise_login_required(
                f'{self.IE_NAME} asks you to solve a CAPTCHA. Solve CAPTCHA in browser and',
                method=cookies)
```

Code after:

        password = self.get_param('videopassword')

        headers = {'Accept': 'application/json'}
        if password:
            headers['accessPwd'] = password

        stream, urlh = self._download_json_handle(
            'https://%s.webex.com/webappng/api/v1/recordings/%s/stream' % (subdomain, video_id),
            video_id, headers=headers, query={'siteurl': siteurl}, expected_status=(403, 429))

        if urlh.status == 403:
            if stream['code'] == 53004:
                self.raise_login_required()
            if stream['code'] == 53005:
                if password:
                    raise ExtractorError('Wrong password', expected=True)
                raise ExtractorError(
                    'This video is protected by a password, use the --video-password option', expected=True)
            raise ExtractorError(f'{self.IE_NAME} said: {stream["code"]} - {stream["message"]}', expected=True)

        if urlh.status == 429:
            self.raise_login_required(
                f'{self.IE_NAME} asks you to solve a CAPTCHA. Solve CAPTCHA in browser and',
                method='cookies')

        video_id = stream.get('recordUUID') or video_id

        formats = [{
            'format_id': 'video',
            'url': stream['fallbackPlaySrc'],
            'ext': 'mp4',
            'vcodec': 'avc1.640028',
            'acodec': 'mp4a.40.2',
        }]
        if stream.get('preventDownload') is False:
            mp4url = try_get(stream, lambda x: x['downloadRecordingInfo']['downloadInfo']['mp4URL'])
            if mp4url:
                formats.append({
                    'format_id': 'video',
                    'url': mp4url,
                    'ext': 'mp4',
                    'vcodec': 'avc1.640028',
                    'acodec': 'mp4a.40.2',
                })
            audiourl = try_get(stream, lambda x: x['downloadRecordingInfo']['downloadInfo']['audioURL'])
            if audiourl:
                formats.append({
                    'format_id': 'audio',
                    'url': audiourl,
                    'ext': 'mp3',