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

Code before:
                data_sync_id=data_sync_id if self.is_authenticated else None,
                player_url=player_url if require_js_player else None,
            )

            require_po_token = self._get_default_ytcfg(client).get('REQUIRE_PO_TOKEN')
            if not po_token and require_po_token:
                self.report_warning(
                    f'No PO Token provided for {client} client. '
                    f'A PO Token is required by this client for working formats. '
                    f'You can manually pass a PO Token for this client with '
                    f'--extractor-args youtube:po_token={client}+XXX',
                    only_once=True)
                deprioritize_pr = True

            pr = initial_pr if client == 'web' else None
            try:
                pr = pr or self._extract_player_response(
                    client, video_id,
                    master_ytcfg=player_ytcfg or master_ytcfg,
                    player_ytcfg=player_ytcfg,
                    player_url=player_url,
                    initial_pr=initial_pr,
                    visitor_data=visitor_data,
                    data_sync_id=data_sync_id,
                    po_token=po_token,
                )
            except ExtractorError as e:
                self.report_warning(e)
                continue

            if pr_id := self._invalid_player_response(pr, video_id):
                skipped_clients[client] = pr_id
            elif pr:
                # Save client name for introspection later
                sd = traverse_obj(pr, ('streamingData', {dict})) or {}
                sd[STREAMING_DATA_CLIENT_NAME] = client
                sd[STREAMING_DATA_PO_TOKEN] = po_token
                for f in traverse_obj(sd, (('formats', 'adaptiveFormats'), ..., {dict})):
                    f[STREAMING_DATA_CLIENT_NAME] = client
                    f[STREAMING_DATA_PO_TOKEN] = po_token
                if deprioritize_pr:
                    deprioritized_prs.append(pr)
                else:
                    prs.append(pr)

            # tv_embedded can work around age-gate and age-verification IF the video is embeddable
            if self._is_agegated(pr) and variant != 'tv_embedded':
                append_client(f'tv_embedded.{base_client}')

            # Unauthenticated users will only get tv_embedded client formats if age-gated
            if self._is_agegated(pr) and not self.is_authenticated:

Review comment (suggestion):
```suggestion
                    po_token=po_token)
```

Code after:

            pr = initial_pr if client == 'web' else None
            try:
                pr = pr or self._extract_player_response(
                    client, video_id,
                    master_ytcfg=player_ytcfg or master_ytcfg,
                    player_ytcfg=player_ytcfg,
                    player_url=player_url,
                    initial_pr=initial_pr,
                    visitor_data=visitor_data,
                    data_sync_id=data_sync_id,
                    po_token=po_token)
            except ExtractorError as e:
                self.report_warning(e)
                continue

            if pr_id := self._invalid_player_response(pr, video_id):
                skipped_clients[client] = pr_id
            elif pr:
                # Save client name for introspection later
                sd = traverse_obj(pr, ('streamingData', {dict})) or {}
                sd[STREAMING_DATA_CLIENT_NAME] = client
                sd[STREAMING_DATA_PO_TOKEN] = po_token
                for f in traverse_obj(sd, (('formats', 'adaptiveFormats'), ..., {dict})):
                    f[STREAMING_DATA_CLIENT_NAME] = client
                    f[STREAMING_DATA_PO_TOKEN] = po_token
                if deprioritize_pr:
                    deprioritized_prs.append(pr)
                else:
                    prs.append(pr)

            # tv_embedded can work around age-gate and age-verification IF the video is embeddable
            if self._is_agegated(pr) and variant != 'tv_embedded':
                append_client(f'tv_embedded.{base_client}')

            # Unauthenticated users will only get tv_embedded client formats if age-gated
            if self._is_agegated(pr) and not self.is_authenticated:
                self.to_screen(
                    f'{video_id}: This video is age-restricted; some formats may be missing '
                    f'without authentication. {self._login_hint()}', only_once=True)

            # EU countries require age-verification for accounts to access age-restricted videos
            # If account is not age-verified, _is_agegated() will be truthy for non-embedded clients
            # If embedding is disabled for the video, _is_unplayable() will be truthy for tv_embedded
            embedding_is_disabled = variant == 'tv_embedded' and self._is_unplayable(pr)
            if self.is_authenticated and (self._is_agegated(pr) or embedding_is_disabled):
                self.to_screen(
                    f'{video_id}: This video is age-restricted and YouTube is requiring '
                    'account age-verification; some formats may be missing', only_once=True)
                # web_creator and mediaconnect can work around the age-verification requirement
                # _producer, _testsuite, & _vr variants can also work around age-verification