gumerov-amir / TTMediaBot

A bot for music streaming to TeamTalk Servers.
https://ttmediabot.ru
MIT License
58 stars 65 forks source link

Unable to play YouTube Videos #123

Open slannon97 opened 2 months ago

slannon97 commented 2 months ago

The bot is unable to play YouTube videos. I updated to the latest version, updated the SDK to 5.15, and ran pip3 install --upgrade yt-dlp to upgrade YouTube-DLP. The player refuses to play or search for videos. I get messages in the terminal that say I need to log in to verify I'm not a bot. Is this possible in the current version or does something need to be implemented in the future?

cyrmax commented 2 months ago

This is not an issue of TTMediaBot. This happens because Youtube implements more strict protection against bots and automated requests. As far as I know, nothing can be done with it, only looking for new IP addresses which are not banned by Youtube and Google. But beware that almost any VDS IP address will be blacklisted because Youtube knows about most hosting providers and their subnets.

slannon97 commented 2 months ago

That's what I thought. Thanks for the confirmation. I'll most likely stop using the bot then, since YouTube was the most useful feature. I'll leave this issue open in case someone else wants to comment or comes up with a fix, but it doesn't seem likely at this point.

Andi593 commented 1 month ago

Yes, correctly. It is a problem of Google, but TTMediaBot needs an implementation that allows to sign in on a Google account, using Oauth2 to solve this problem.

ChrisDuffley commented 1 month ago

Hi,

According to the YT-DLP documentation, --cookies <file> can be passed to allow this to occur via the command line. However, the current usage of YT-DLP doesn't allow passage of this parameter, or any for that matter, via a configuration file so that this can be passed on each execution. If this can be done, then this would be sufficient enough (I think), as we can grab cookies from our browser and then upload the TXT file to the server. That's what yt-dlp suggested to do when I tried it from the command line and got "Sign in to confirm you're not a bot".

@dglee42, this is what I'm talking about in regard to this being an issue.