Skip to content

Commit

Permalink
Add debug in YouTubeVideoUrl
Browse files Browse the repository at this point in the history
force-test skip-release
  • Loading branch information
Taapat authored Feb 1, 2025
1 parent 4eb85df commit 10cf682
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/YouTubeVideoUrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ def _extract_player_response(self, video_id, yt_auth, client):
if sts:
data['playbackContext']['contentPlaybackContext']['signatureTimestamp'] = sts
headers['X-YouTube-Client-Version'] = VERSION
print('[YouTubeVideoUrl] headers', headers)
try:
return loads(self._download_webpage(url, data, headers)), player_id
except ValueError: # pragma: no cover
Expand All @@ -472,6 +473,7 @@ def _real_extract(self, video_id, yt_auth):
if not player_response:
raise RuntimeError('Player response not found!')

print('[YouTubeVideoUrl] streaming formats', len(player_response.get('streamingData', {}).get('formats', [])))
is_live = self.try_get(player_response, ('videoDetails', 'isLive'))

if is_live:
Expand Down

0 comments on commit 10cf682

Please sign in to comment.