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

Code before:
                        mvpd_confirm_page_res = post_form(
                            provider_login_page_res, 'Logging in', {
                                mso_info['username_field']: username,
                                mso_info['password_field']: password,
                            }, validate_url=True)
                        mvpd_confirm_page, urlh = mvpd_confirm_page_res
                        if '<button class="submit" value="Resume">Resume</button>' in mvpd_confirm_page:
                            post_form(mvpd_confirm_page_res, 'Confirming Login')
                elif mso_id == 'Philo':
                    # Philo has very unique authentication method
                    philo_ident_payload = {
                        'ident': username,
                        'device': 'web',
                        'send_confirm_link': False,
                        'send_token': True,
                        'device_ident': f'web-{uuid.uuid4().hex}',
                        'include_login_link': True,
                    }

                    self._download_json_handle(
                        'https://idp.philo.com/auth/init/login_code', video_id,
                        note='Requesting Philo auth code', data=json.dumps(philo_ident_payload).encode('utf-8'),
                        headers={
                            'Content-Type': 'application/json',
                            'Accept': 'application/json',
                        })

                    philo_code = getpass.getpass('Type auth code you have received [Return]: ')

                    update_code_payload = {'token': philo_code}
                    self._download_json_handle(
                        'https://idp.philo.com/auth/update/login_code', video_id,
                        note='Submitting token', data=json.dumps(update_code_payload).encode('utf-8'),
                        headers={
                            'Content-Type': 'application/json',
                            'Accept': 'application/json',
                        })

                    mvpd_confirm_page_res = self._download_webpage_handle('https://idp.philo.com/idp/submit', video_id, 'Confirming Philo Login')
                    post_form(mvpd_confirm_page_res, 'Confirming Login')
                elif mso_id == 'Verizon':
                    # In general, if you're connecting from a Verizon-assigned IP,
                    # you will not actually pass your credentials.
                    provider_redirect_page, urlh = provider_redirect_page_res
                    # From non-Verizon IP, still gave 'Please wait', but noticed N==Y; will need to try on Verizon IP
                    if 'Please wait ...' in provider_redirect_page and '\'N\'== "Y"' not in provider_redirect_page:
                        saml_redirect_url = self._html_search_regex(
                            r'self\.parent\.location=(["\'])(?P<url>.+?)\1',
                            provider_redirect_page,
                            'SAML Redirect URL', group='url')
                        saml_login_page = self._download_webpage(

Review comment (security):
- inline the payload since it's only used once
- `utf-8` is the default
- since we don't need to read the content of the response, just use `_request_webpage`
```suggestion
                    self._request_webpage(
                        'https://idp.philo.com/auth/init/login_code', video_id,
                        'Requesting Philo auth code', data=json.dumps({
                            'ident': username,
                            'device': 'web',
                            'send_confirm_link': False,
                            'send_token': True,
                            'device_ident': f'web-{uuid.uuid4().hex}',
                            'include_login_link': True,
                        }).encode(), headers={
                            'Content-Type': 'application/json',
                            'Accept': 'application/json',
                        })
```

Code after:
                        mvpd_confirm_page_res = post_form(
                            provider_login_page_res, 'Logging in', {
                                mso_info['username_field']: username,
                                mso_info['password_field']: password,
                            }, validate_url=True)
                        mvpd_confirm_page, urlh = mvpd_confirm_page_res
                        if '<button class="submit" value="Resume">Resume</button>' in mvpd_confirm_page:
                            post_form(mvpd_confirm_page_res, 'Confirming Login')
                elif mso_id == 'Philo':
                    # Philo has very unique authentication method
                    self._request_webpage(
                        'https://idp.philo.com/auth/init/login_code', video_id,
                        'Requesting Philo auth code', data=json.dumps({
                            'ident': username,
                            'device': 'web',
                            'send_confirm_link': False,
                            'send_token': True,
                            'device_ident': f'web-{uuid.uuid4().hex}',
                            'include_login_link': True,
                        }).encode(), headers={
                            'Content-Type': 'application/json',
                            'Accept': 'application/json',
                        })

                    philo_code = getpass.getpass('Type auth code you have received [Return]: ')
                    self._request_webpage(
                        'https://idp.philo.com/auth/update/login_code', video_id,
                        'Submitting token', data=json.dumps({'token': philo_code}).encode(),
                        headers={
                            'Content-Type': 'application/json',
                            'Accept': 'application/json',
                        })

                    mvpd_confirm_page_res = self._download_webpage_handle('https://idp.philo.com/idp/submit', video_id, 'Confirming Philo Login')
                    post_form(mvpd_confirm_page_res, 'Confirming Login')
                elif mso_id == 'Verizon':
                    # In general, if you're connecting from a Verizon-assigned IP,
                    # you will not actually pass your credentials.
                    provider_redirect_page, urlh = provider_redirect_page_res
                    # From non-Verizon IP, still gave 'Please wait', but noticed N==Y; will need to try on Verizon IP
                    if 'Please wait ...' in provider_redirect_page and '\'N\'== "Y"' not in provider_redirect_page:
                        saml_redirect_url = self._html_search_regex(
                            r'self\.parent\.location=(["\'])(?P<url>.+?)\1',
                            provider_redirect_page,
                            'SAML Redirect URL', group='url')
                        saml_login_page = self._download_webpage(
                            saml_redirect_url, video_id,
                            'Downloading SAML Login Page')
                    elif 'Verizon FiOS - sign in' in provider_redirect_page:
                        # FXNetworks from non-Verizon IP
                        saml_login_page_res = post_form(