Open SolarTheCatto opened 4 months ago
Seeing this error too, but only when deployed (on Vercel)
Looked into it more. Its because of this response, in my case for getSong()
Looked into it more. Its because of this response, in my case for getSong()
If that message is persistent, then it means the requesting IP (in your case, Vercel's IP) has been blocked by YouTube, which is becoming increasingly common as Google is fighting back. (See yt-dlp Issue #10128)
Not sure I can do anything about a blocked IP address from my side... Alternatively you can try providing your youtube music cookies into the library constructor to act as a "login"?
That's fair enough I suppose. I wasn't able to get around it just by using cookies. I think at the very least adding a callout to the readme to beware of this / an explicit error message in the code. I was only able to see this error message by patching the package locally and repeatedly redeploying it.
Not sure I can do anything about a blocked IP address from my side... Alternatively you can try providing your youtube music cookies into the library constructor to act as a "login"?
Doing this could make them blacklist your YouTube account. There have been reports of yt-dlp users receiving "Video Unavailable" on every single video they try to watch because the account was flagged and consequently blacklisted.
Please exercise caution passing cookies, and use a proxy/vpn whenever possible to prevent them tracing it to source!!!
Please describe the current behaviour of the code.
When calling
ytmusic.search('query')
, the request fails with 400 Bad Request.Please describe the expected behaviour of the code.
The expected behaviour is that I would receive the songs, not receive an error.
What are the steps to reproduce the error?
call
ytmusic.search('query')
, observe as it doesn't succeed, and instead throws 400 Bad RequestAdditional Information
The full error log is as follows: