Closed ishandutta2007 closed 3 months ago
The 403 problem is #32905. Possibly format 18 (640x60 + audio) may be accessible.
If you want to get just video or combined audio+video at 1080 if available:
- "(bestvideo/best)[height>=1080]/bestvideo/best"
However because of #32905, that may not be effective at present.
@dirkf I read through the post but I still don't have clarity on how to solve it. They seem to safeguard with Cloudflare, captcha and what not . I am curious if it's so difficult how does y2meta.app guys do it?
No, I don't know how to solve your problem either because #32905 is still open and it's not clear from your problem explanation whether that's the only problem that you're asking about. Which "They" is seeming to safeguard with [etc]?
As to your .app service, maybe they run a headless browser in their server or behind the scenes in your client device to run all the necessary JS challenges. Better ask them.
You mean y2meta.app either use Selenium/Appium or are doing it entirely from clientside (ie my browser) ? Here is y2meta.app's tampermonkey script https://y2meta.app/extensions/chrome/helper.user.js?t=638588954439378072 They seem to be making a server call .
var t = "https://y2meta.com/youtube/" + MaxMain.vid + "/?utm_source=chrome_addon";
Let me know if I am missing something .
@dirkf do you know any good Selenium/Puppeteer open-source project doing the same. Given that youtube-dl is so popular I was under the impression it covers all those use-cases. y2meta.app is not the only youtube downloader site/addon, there seem to a dozen other doing it. It would be strange if there aren't any open-source equivalent of any of them ?
The browser script just sends the YT URL to the server. Then it's up to them how to generate the video that is presumably then offered in the browser downloads.
Generally sites that people want yt-dl to handle have relied on custom video players that don't offer the rightful Save Video As... function (why yt-dl exists), and then by more or less trivial obfuscation of the player, which determined users can often reverse or bypass, or by DRM encryption of the media, which we don't address. Now that almost everyone's client is a supercomputer (by Web 1.0 standards), it's realistic for sites to make their challenges much more complex and correspondingly difficult to solve. This is why a YT video page that could use a plain HTML5 video tag instead sends ~4MB of JS.
As linked in #32905, eg, Invidious has a tool for grabbing valid poToken
data from a browser and possibly (I didn't check) that data could then be injected to get valid media from YT to show in their low-bloat client.
Generally sites that people want yt-dl to handle have relied on custom video players that don't offer the rightful Save Video As
I see. So I need custom video player too ? If so in that case yt-dl library alone isn't very useful. You referred to this one I guess: https://github.com/iv-org/youtube-trusted-session-generator . I am surprised that it isn't more popular. My hunch was end to end downloader project would be more popular that youtube-dl library. Do you know of any popular end to end project (open-source) who have integrated youtube-dl . By end to end I mean, I can simply start the server and use it like these downloader sites ?
@dirkf do you know any good Selenium/Puppeteer open-source project doing the same. Given that youtube-dl is so popular I was under the impression it covers all those use-cases. y2meta.app is not the only youtube downloader site/addon, there seem to a dozen other doing it. It would be strange if there aren't any open-source equivalent of any of them ?
I use this: https://github.com/FlareSolverr/FlareSolverr - with another app - would this help?
I presume that the original question has been solved; the remaining issue of 403 on media download is continued in #32905.
Checklist
Question
To download youtube videos I typically use : https://y2meta.app/en/youtube/rU8_Fg103ZQ [1080p (.mp4) full-HD] resolution. Now I am looking to replicate the same vis code. I realised
"format": "bestvideo[height=1080]/best[height=1080]",
errors out.What doesnt error out is this:
but here I get a resolution with height mere 360p.
PS: I dont care about the audio, a mute mp4 with height = 1080p is enough for me.
EDIT: I have run with versbose mode the following and it download first fragment without issue but fails to succeeding ones.
The warning:
probably sites like y2meta.app use some sort of proxy setting which I need, What is it ?