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.13k stars 643 forks source link

Returning 404 Errors, despite valid URLs for Youtube-DL and Valid API Key #1169

Closed AyoungDukie closed 1 year ago

AyoungDukie commented 3 years ago

Despite a valid Youtube API key, many videos/soundtracks fail to play now, simply returning 404 not found errors. Appears potentially related to this issue in pafy https://github.com/mps-youtube/pafy/issues/290

Issue / Suggestion

Appears to fail to fetch some URLs, giving a 404 not found error. I checked my API dashboard to verify, and the api itself seems to not be showing errors. It also works for some videos, which wouldn't seem to be the case if it was related to the API quota issue that is usually a problem.

Additionally, grabbing the url with x # and then using youtube-dl directly seems to work.

Steps to reproduce: Search \lofi coding beats Select entry instead for "Lofi Coding Mix 1 [Stay Home Edition]" (was entry 5 for me) -> video loads and plays Select entry for "4 AM Coding Session - Lofi Hip Hop Mix [Code - Relax - Study]" (was entry 6 for me) -> returns 404 error with Problem playing last item: HTTP Error 404: Not Found URL of video: https://youtube.com/watch?v=1YlxJrSaqPw

Your Environment

mpsyt version      : 0.2.8
   notes           : released 17 February 2018
pafy version       : 0.5.5 (youtube-dl backend)
youtube-dl version : 2021.06.06
Python version     : 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)]
Processor          : Intel64 Family 6 Model 158 Stepping 13, GenuineIntel
Machine type       : AMD64
Architecture       : 64bit, WindowsPE
Platform           : Windows-10-10.0.19043-SP0
sys.stdout.enc     : utf-8
default enc        : utf-8
Config dir         : C:\Users\jflynn\AppData\Roaming\mps-youtube
env:TERM           : xterm-256color
johanbluecreek commented 3 years ago

I had this problem for any video I tried to play. Looking at https://github.com/mps-youtube/mps-youtube/issues/1143, I switched to development branch

pip3 install --user -U git+https://github.com/mps-youtube/mps-youtube.git

which solved it.