imputnet / cobalt

best way to save what you love
https://cobalt.tools
GNU Affero General Public License v3.0
17.12k stars 1.38k forks source link

Blocked public API use for goodtube4u #600

Closed goodtube4u closed 4 months ago

goodtube4u commented 4 months ago

Hey man,

I'm the creator of a little Youtube adblock thing called "GoodTube". Details here: https://github.com/goodtube4u/goodtube

Until earlier today - this was setup to connect to your public API (api.cobalt.tools) and using it to allow users to download videos.

However - it appears that yesterday, you swapped the functionality to instead;

I'd say that's a bit unfair, as this plugin is actually 100% open source and not for profit (no donations either). It's basically a community focused project...

Not sure where to go from here?

The terms are your own - as it's your product. Just thought I'd hit you up before looking for an alternative.

Cheers.

lostdusty commented 4 months ago

what error are you getting? is it being redirected to blocked.cobalt.tools?

goodtube4u commented 4 months ago

Hey thanks for the reply.

Uh yep, that's being returned when I direct a user to the stream URL that the API returns.

Was working fine, then suddenly this problem so I don't think it's my implementation.

Do you think the issue is that requests originating from youtube.com are being blocked by the API / CORS headers or similar?

goodtube4u commented 4 months ago

Further on this, I get the stream URL back from the following endpoint: https://api.cobalt.tools/api/json/

However, from there I try to open it for the user using: window.open('THE STREAM URL THAT WAS RETURNED', '_self');

That redirects the user to blocked.cobalt.tools

Other times in the script, I also try to fetch the source of the stream URL using Javascript's fetch API (in order to put it in a blob object so I can then rename it for them before downloading it). This is also failing.

Any ideas?

wukko commented 4 months ago

we've blocked access to our api from your extension because we don't agree with your ethics:

we will not unblock your extension, but you can host a cobalt instance yourself and use it instead. you have to mention that you rely on cobalt and invidious with links to respective github repos.

we reserve full rights to take any actions needed to stop unfair use of our free api.

i have archived the user script with obfuscation of our old api endpoint & call for your users to send us "angry messages": https://web.archive.org/web/20240630075645/https://github.com/goodtube4u/goodtube/raw/main/goodtube.user.js