mps-youtube / yewtube

yewtube, forked from mps-youtube , is a Terminal based YouTube player and downloader. No Youtube API key required.
GNU General Public License v3.0
8.12k stars 642 forks source link

403 Forbidden on play #1286

Open elig0n opened 2 months ago

elig0n commented 2 months ago

Issue / Suggestion

When trying to play any song with mpv/vlc the player did not show up. tracing a mpv log shows 403 Forbidden for a googlevideo.com URL (redacted log data below):

[   0.001][v][cplayer] Command line options: '--log-file=/home/user/mpv.log' '--force-media-title="..."' '--no-ytdl' '--really-quiet' 'https://rr1---sn-nhpax-ua8k.googlevideo.com/videoplayback?expire=1725481167...' '--input-ipc-server=/tmp/mpsyt-mpvsgtvgfh0.sock'
...
[   1.373][v][ffmpeg] Opening https://rr1---sn-nhpax-ua8k.googlevideo.com/videoplayback?expire=1725481167...
[   1.382][d][ffmpeg] tcp: Starting connection attempt to 82.102.159.12 port 443
[   1.387][d][ffmpeg] tcp: Successfully connected to 82.102.159.12 port 443
[   1.424][w][ffmpeg] https: HTTP error 403 Forbidden
[   1.424][e][stream] Failed to open https://rr1---sn-nhpax-ua8k.googlevideo.com/videoplayback?expire=1725481167...
...

I managed to overcome the problem with PR https://github.com/mps-youtube/yewtube/pull/1284 for a temporary fix

Your Environment

yewtube version : 2.10.5 (git) yt_dlp version : 2024.08.06 Python version : 3.12.3 (main, Apr 23 2024, 09:16:07) [GCC 13.2.1 20240417]

ffmpeg version n7.0.1 Copyright (c) 2000-2024 the FFmpeg developers

astroanax commented 2 months ago

the PR didn't work for me, with set pipe_direct_mpv and set player mpv

What am i missing? I still get the 403 error, with both VLC, and mpv