Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

empty downloaded file from youtube #816

Open
2shiraz opened this issue Oct 6, 2024 · 4 comments
Open

empty downloaded file from youtube #816

2shiraz opened this issue Oct 6, 2024 · 4 comments

Comments

@2shiraz
Copy link

2shiraz commented Oct 6, 2024

problem description

I was thinking of using a proxy instead of cookies (since making new accounts other day is becoming really hard), but when I tried this in my local environment, without cookies, the downloaded file ends up as an empty 0-byte file. The same happens when I use a proxy.

I tested the proxy, and it seems to work because, when I don't use the proxy on a server (with a data center IP), I get a youtube login error. But when I use the proxy, there's no login error anymore. However, the downloaded file is still empty.

I noticed that when using cookies, the YouTube info I logged shows that the download links ( those googlevideo.com links ) work, but without a proxy or without cookies, the links return a 403 error.

I am using cobalt v10.0.0

UPDATE: I tested the proxy more on my phone and pc and youtube is working perfectly fine.

tldr: without using cookies youtube downloading doesn't give any API error but an empty file is received ( 0-bytes )

my instance configuration

API_URL=http://localhost:9000/
API_PORT=9000
API_NAME=local
API_EXTERNAL_PROXY=http://user:pass@ip:port
@KwiatekMiki
Copy link
Contributor

you need to use cookies

@2shiraz
Copy link
Author

2shiraz commented Oct 6, 2024

you need to use cookies

yeah that's what I am currently doing but can't we use proxy to do the same thing as using ISP proxy doesn't give Youtube login error ( youtube seems to work )

@KwiatekMiki
Copy link
Contributor

youtube probably changed something

@2shiraz
Copy link
Author

2shiraz commented Oct 6, 2024

Strangely i got it fixed by changing the client from IOS to always using ANDROID

info = await yt.getBasicInfo(o.id, 'ANDROID'); in /api/src/processing/services/youtube.js

I don't know why IOS client was there but this fixed for me.

@wukko was there is any specific reason you were using IOS client when there was no youtube session present as I don't want to break the downloader in long term.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants