Live data from Hacker News

Yt-dlp: External JavaScript runtime now required for full YouTube support

github.com

411–420 of 646 posts

Re: Yt-dlp: External JavaScript runtime now required for full YouTube support

#411

Seems its already in Arch's repositories, and seems to work, just add another flag to the invocation: yt-dlp --cookies-from-browser firefox --remote-components ejs:github -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" 'https://www.youtube.com/watch?v=XXX' It is downloading a solver at runtime, took maybe half a second in total, downloads are starting way faster than before it seems to me. [youtube] [js…

https://aur.archlinux.org/packages/yt-dlp-ejs looks like what you need?

No, don't need anything extra, `extra/yt-dlp` works perfectly fine and is enough. You'll get a warning if you run it without the flag:

    WARNING: [youtube] [jsc] Remote components challenge solver script (deno) and NPM package (deno) were skipped. These may be required to solve JS challenges. You can enable these downloads with  --remote-components ejs:github  (recommended) or  --remote-components ejs:npm , respectively. For more information and alternatives, refer to  https://github.com/yt-dlp/yt-dlp/wiki/EJS
Providing one of the flags automatically lets it automatically get what it needs. No need for AUR packages :)

Edit: Maybe I misunderstood, now when I re-read your post. You meant it'll prevent the automatic download at runtime perhaps? That sounds about right if so.

Re: Yt-dlp: External JavaScript runtime now required for full YouTube support

#412

Scraping sucks. Imagine a broken API with new breakages every few weeks. Now imagine the provider hates you. Shout out to the team for what they do.

Exactly. I could never maintain yt-dlp. Must be exhausting.

Re: Yt-dlp: External JavaScript runtime now required for full YouTube support

#413
post #102

From https://github.com/yt-dlp/yt-dlp/wiki/EJS it looks like deno is recommended for these reasons: > Notes > * Code is run with restricted permissions (e.g, no file system or network access) > * Supports downloading EJS script dependencies from npm (--remote-components ejs:npm).

It's fine for this project since google is probably not in the business of triggering exploits in yt-dlp users but please do not use deno sandboxing as a your main security measure to execute untrusted code . Runtime-level sandboxing is always very weak. Relying on OS-level sandboxing or VMs (firecracker & co) is the right way for this.

> It's fine for this project since google is probably not in the business of triggering exploits in yt-dlp

yt-dlp supports a huge list of websites other than youtube

Re: Yt-dlp: External JavaScript runtime now required for full YouTube support

#414
post #376

Earlier quoted context omitted.

Didn't work because asymmetric upload/download speeds (which now are a thing of the past; however, it gave youtube an early advantage).

Guess why it was asymmetrical in the first place ... Telcos wanted to sell the upload bandwidth to streaming companies. Another double dipping Telco monopoly squeeze and customer boxing / enshitification from very early on.

I thought it was just trading more download for less upload when last mile bandwidth was limited by re-using old POTS copper.

Wasn't dialup largely asymmetric too? I don't think p2p streaming was even on the radar back then.

Re: Yt-dlp: External JavaScript runtime now required for full YouTube support

#415
post #198
post #84

Earlier quoted context omitted.

I actually do! I have a perpetual VLC playlist which plays those videos randomly if I need some background noise.

How many of the 20,000+ videos you've saved locally do you actually care about if they get "removed" from YouTube?

You never know until you need to find something and can’t find it.

Re: Yt-dlp: External JavaScript runtime now required for full YouTube support

#417

Earlier quoted context omitted.

The right analogy would be a newspaper delivering you the paper in ~milliseconds when you ask for it, whereever in the world, for free, and then you proceed to rip off the ads and read it. The reason newspaper do the delivery was the promise that you'll see the ads, and they get to make money from that ads. If they notice that you do all of the work of providing you the newspaper almost instantly and you dont see the…

Firstly, ad watch time is not currency. Second once the paper's in my hands, I get to do what I want with it, and the expectations of the paper company has no bearing on it. If they don't want to give me the paper for free, they should stop, but they haven't yet. Their expectation to make a certain amount of revenue from ads doesn't obligate the consumer. If their business model isn't making them the profit they need…

> Second once the paper's in my hands, I get to do what I want with it, and the expectations of the paper company has no bearing on it.

Absolutely! I run an adblocker as well!

At the same time, you'd agree they have the right to refuse to serve you (access denied) or make you jump through hoops (solve a challenge etc)

Re: Yt-dlp: External JavaScript runtime now required for full YouTube support

#418
post #186

Earlier quoted context omitted.

Glad to hear it’s faster now! YouTube barely works in a full-on browser these days, props to the team that keeps it accessible via a Python script!

I use YouTube on a daily basis. I haven't seen any of these problems.

It is likely you use Chrome or a browser that uses Blink for its engine and the OP uses a non-blink browser like Firefox. I use Firefox and I can cofirm since the last few months Youtube usability borders on usable

Re: Yt-dlp: External JavaScript runtime now required for full YouTube support

#419

Earlier quoted context omitted.

> That's a bit like complaining no cars have trouble because your Fiat doesn't have a problem. No. Because even if it might be complicated, any website developer can test their website against a wide array of browsers, in a more or less automated way.

So you're expecting Google engineers and managers to prioritize adding broad cross-browser support, which adds more work for them, when the same company is also developing a competing browser? No, Firefox always been a second-rate guest at Google properties, and I'm not expecting it to change soon either. Why would they make it better when status quo means more Chrome users (in their mind)?

It's not 2003, the browser isn't the battle.

I would expect YouTube managers to pressure the Chrome managers, because YouTube brings in billions of dollars every month. Likewise I would expect the trend to move in favor of YouTube, because the browser loses money at an increasing amount and YouTube generates money at an increasing amount. 70% of YouTube happens on Mobile, and in the US more people are now watching on TVs than phones. Source: Nielsen, the old-school company that has huge influence over ads.

The site pops a literal warning saying "having problems? turn off your ad blocker" so I'm not sure where the mysteries lie here.

They're testing on thousands of devices. And they're probably even testing against ad-blockers on your bro-browser. But they're certainly not motivated to optimize that experience, so you get what you get.

Re: Yt-dlp: External JavaScript runtime now required for full YouTube support

#420

Earlier quoted context omitted.

Local video could be a nightmare in 90s. I remember those days. I remember when it was revolutionary that the Microsoft Media Player came out, and you could use one player for several formats, rather than each video format requiring its own (often buggy) player. Getting the right codecs was still a chore, though. MS Media Player eventually fell behind the curve, but eventually we got VLC and things got great.

> MS Media Player eventually fell behind the curve, but eventually we got VLC and things got great. And in-between those we had Media Player Classic together with the Combined Community Codec Pack, and once you had MPC + CCCP installed, you could finally view those glorious aXXo-branded 700MB files found on a random DC++ hub.

I'm still using the Media Player Classic Home Cinema to this day. https://github.com/clsid2/mpc-hc

Never liked VLC, but that's just me.

Post reply on HN