Live data from Hacker News

YouTube-dl has an interpreter for a subset of JavaScript in 870 lines of Python

twitter.com

141–150 of 166 posts

Re: YouTube-dl has an interpreter for a subset of JavaScript in 870 lines of Python

#141
post #121

Earlier quoted context omitted.

Agreed. If you only know this from someone else's observation, you should link the observation.

That is against HN guidelines: "Please submit the original source. If a post reports on something found on another site, submit the latter." - https://news.ycombinator.com/newsguidelines.html

Hot take, but that guideline is just bad. It removes necessary context and may even obscure relevant developments in a public dialogue. Original posts make sense only if the repost is not adding to the dialogue or otherwise making interesting contributions.

(If you disagree, this may the one time I will actively ask you to flag this post, so a mod can respond to this point)

Re: YouTube-dl has an interpreter for a subset of JavaScript in 870 lines of Python

#142
post #121

Earlier quoted context omitted.

That is against HN guidelines: "Please submit the original source. If a post reports on something found on another site, submit the latter." - https://news.ycombinator.com/newsguidelines.html

Citing the guidelines is against the guidelines, if not by the letter, in spirit. It's boring and it lacks curiosity. It assumes too much about the sharer. "Can we stop this trend" is a dog whistle for the "HN is getting worse" complaint. Instead we could be considering if we're meant to read the Twitter conversation as well, or sharing a laugh about the link in the tweet author's bio. Or maybe the sharer didn't feel…

If guidelines were not to be cited, who would it guide?

Re: YouTube-dl has an interpreter for a subset of JavaScript in 870 lines of Python

#143
post #121

Earlier quoted context omitted.

That is against HN guidelines: "Please submit the original source. If a post reports on something found on another site, submit the latter." - https://news.ycombinator.com/newsguidelines.html

Hot take, but that guideline is just bad. It removes necessary context and may even obscure relevant developments in a public dialogue. Original posts make sense only if the repost is not adding to the dialogue or otherwise making interesting contributions. (If you disagree, this may the one time I will actively ask you to flag this post, so a mod can respond to this point)

Perhaps some sort of convention, like /r/science could be followed (like having OP post a link to the article or reference as a top comment).

Re: YouTube-dl has an interpreter for a subset of JavaScript in 870 lines of Python

#144

Earlier quoted context omitted.

Many channels would be more than happy to enable download options, if possible. Hell, how is Creative Commons licence they totally give you option to select, work in case of videos that can't be downloaded in any way?

But would the channel owner be happy to enable download options if $0.09 per GB downloaded was subtracted from their ad revenue?

If you cite a price that high for bulk data then if you get an answer of "no" it won't prove anything. Try asking about a competitive price.

For ballpark numbers, youtube dedicates 1200kbps to 1080p videos in VP9. Let's say we have a 10 minute video with an RPM of $3.

We can arrange a CDN to deliver files at $0.005 per GB without even putting effort into it. And that's at a super low scale. The price drops a lot from there as things get bigger. So I'll use that number, and note that it's being generous to google.

So that's 0.3 cents of revenue per watch, which is 90MB of data that would cost .045 cents to deliver.

One view would pay for about 7 downloads. And how many downloads are we likely to see? Probably under 10% of viewers.

I'd turn that option on.

Re: YouTube-dl has an interpreter for a subset of JavaScript in 870 lines of Python

#145

Earlier quoted context omitted.

Hot take, but that guideline is just bad. It removes necessary context and may even obscure relevant developments in a public dialogue. Original posts make sense only if the repost is not adding to the dialogue or otherwise making interesting contributions. (If you disagree, this may the one time I will actively ask you to flag this post, so a mod can respond to this point)

Perhaps some sort of convention, like /r/science could be followed (like having OP post a link to the article or reference as a top comment).

This. Whenever I post a comic and something funny comic on Twitter/FB (i put credit: URL their home page or IG), but on Reddit, there is no such thing. Most Reddit admins also ban direct linking to sources due to spam or remote server overloading. So instead, you need to use Imgur or Reddit's hosting. So I write a comment saying credit which often gets enough upvotes to push at the top of the thread. I think those content creators deserve traffic and recognition too. It is good karma for everyone.

Re: YouTube-dl has an interpreter for a subset of JavaScript in 870 lines of Python

#146
post #119

Can we stop the trend of linking to tweets that just contain another link to the content? what's the point? Wouldn't this be 10x better if it was a link directly to the github?

I often share links to HN instead of the referred link. Many times the comments are as interesting as the content. This applies to sharing Twitter or Reddit links, too, albeit with a lower S/N ratio.

Is there some trick to actually being able to see information on Twitter? When I click a tweet, I get the tweet, then a random smattering of 2-3 semi-related tweets, and then a login popup that breaks the page

Do you guys use an extension to process it or something?

(Same issue with Reddit of course)

Re: YouTube-dl has an interpreter for a subset of JavaScript in 870 lines of Python

#147
post #119

Earlier quoted context omitted.

I often share links to HN instead of the referred link. Many times the comments are as interesting as the content. This applies to sharing Twitter or Reddit links, too, albeit with a lower S/N ratio.

Is there some trick to actually being able to see information on Twitter? When I click a tweet, I get the tweet, then a random smattering of 2-3 semi-related tweets, and then a login popup that breaks the page Do you guys use an extension to process it or something? (Same issue with Reddit of course)

replace "twitter.com" with "nitter.net", or for video embedding (discord, etc) use vxtwitter.com or fxtwitter.com. Tweetdeck is what a lot of twitter people use for "serious twittering" (lol).

For reddit use old.reddit.com instead of www.reddit.com. Reddit is Fun is a great native app for android and on iOS there's Apollo.

Both sites are laser-focused on driving conversions and engagement which means forcing you into an account and native apps (specifically their shitty native apps), and undoubtedly they'll start breaking the workarounds and third-party clients for realsies at some point.

But I mean, if users don't even have an account and native app install, how can they possibly get you doomscrolling all day? It's 2022, it's all about the engagement metrics, fuck user experience.

Re: YouTube-dl has an interpreter for a subset of JavaScript in 870 lines of Python

#148
post #102
post #92

Earlier quoted context omitted.

Google attempting zero days on client computers would be something. It's not totally without precedent (Sony CD rootkits - https://en.wikipedia.org/wiki/Sony_BMG_copy_protection_rootk... ) but would still be major news.

While they likely wouldn't do a zero-day, their JS files, particularly for automated captchas, do push the boundaries of whatever JS engine they're executed inside. See https://github.com/neuroradiology/InsideReCaptcha#the-analys... and note that this analysis is 8 years old. While there's minimal risk if you're either using a full-fledged modern JS engine or a limited-subset interpreter like the OP, an older or non-…

It's interesting to speculate about why they don't use this much more powerful technology to stop ytdl but instead use this much weaker yt specific thing.

Most likely the reason is that they keep the botguard system for the stuff that matters to them a lot more like account signups and click fraud, and don't want to incentivize the ytdl guys to break it on behalf of spammers/clickfraudsters.

Re: YouTube-dl has an interpreter for a subset of JavaScript in 870 lines of Python

#149

Earlier quoted context omitted.

Just npm install puppeteer.

Puppeteer is cool, but it's exactly what OP is warning against: it's a full browser that is downloaded and run through npm. It's remarkably well packaged, but still far more error prone than a simple HTTP request, and far more likely to break on its own just with the passage of time.

Yes, but:

”Your simple script goes from being small, simple, self-contained, and elegant gem, to requiring a full browser, specialized drivers, and/or daemons running just to work”

Complex problems cannot be solved by simple scripts, but they can be abstracted away to vendor libraries when/if they are well maintained, such as in this case. While it can break with time, at least someone else fixes it for you.

Re: YouTube-dl has an interpreter for a subset of JavaScript in 870 lines of Python

#150

Earlier quoted context omitted.

Just npm install puppeteer.

Puppeteer is cool, but it's exactly what OP is warning against: it's a full browser that is downloaded and run through npm. It's remarkably well packaged, but still far more error prone than a simple HTTP request, and far more likely to break on its own just with the passage of time.

There's also puppeteer-core which lets you use your own (Google Chrome) browser and if your own browser is broken then you're having bigger problems than youtube-dl not working.
Post reply on HN