1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-12 21:38:31 +00:00

[ie/youtube] Improve PO token logging (#14447)

Authored by: seproDev
This commit is contained in:
sepro 2025-09-26 20:12:16 +02:00 committed by GitHub
parent 4429fd0450
commit 7df5acc546
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2920,7 +2920,7 @@ def fetch_po_token(self, client='web', context: _PoTokenContext = _PoTokenContex
if player_url and context == _PoTokenContext.GVS and not visitor_data and not self.is_authenticated: if player_url and context == _PoTokenContext.GVS and not visitor_data and not self.is_authenticated:
self.report_warning( self.report_warning(
f'Unable to fetch GVS PO Token for {client} client: Missing required Visitor Data. ' f'Unable to fetch GVS PO Token for {client} client: Missing required Visitor Data. '
f'You may need to pass Visitor Data with --extractor-args "youtube:visitor_data=XXX"') f'You may need to pass Visitor Data with --extractor-args "youtube:visitor_data=XXX"', only_once=True)
return return
if context == _PoTokenContext.PLAYER and not video_id: if context == _PoTokenContext.PLAYER and not video_id:
@ -2943,7 +2943,7 @@ def fetch_po_token(self, client='web', context: _PoTokenContext = _PoTokenContex
if player_url and context == _PoTokenContext.GVS and not data_sync_id and self.is_authenticated: if player_url and context == _PoTokenContext.GVS and not data_sync_id and self.is_authenticated:
self.report_warning( self.report_warning(
f'Unable to fetch GVS PO Token for {client} client: Missing required Data Sync ID for account. ' f'Unable to fetch GVS PO Token for {client} client: Missing required Data Sync ID for account. '
f'You may need to pass a Data Sync ID with --extractor-args "youtube:data_sync_id=XXX"') f'You may need to pass a Data Sync ID with --extractor-args "youtube:data_sync_id=XXX"', only_once=True)
return return
po_token = self._fetch_po_token( po_token = self._fetch_po_token(