TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Youtube.js – full-featured wrapper around YouTube's private API

413 点作者 mahnouel大约 3 年前

16 条评论

binarynate大约 3 年前
This is really cool, but maybe the README&#x27;s disclaimer should also warn that using YouTube&#x27;s private APIs is against their Terms of Service[0], specifically this section:<p><pre><code> The following restrictions apply to your use of the Service. You are not allowed to: (...) 3. access the Service using any automated means (such as robots, botnets or scrapers) except (a) in the case of public search engines, in accordance with YouTube’s robots.txt file; or (b) with YouTube’s prior written permission; </code></pre> It would be great if YouTube updated their ToS to permit this because that could unlock some really interesting innovation. Until then, devs should at least be aware that building a product with these APIs is risky.<p>[0]: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;static?template=terms" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;static?template=terms</a>
评论 #31036369 未加载
评论 #31036722 未加载
评论 #31038095 未加载
matheusmoreira大约 3 年前
Awesome!! A custom client for YouTube that bypasses all their front end code. I wish there was something like this for every single web site!
评论 #31038077 未加载
RobertRoberts大约 3 年前
The reason I stopped integrating any API based system (FB, Twitter, etc...) into my code bases for services I don&#x27;t pay for (or my customers) is because they all changed willy-nilly and broke on a regular basis.<p>This is more likely to break (be broken by google) than an official API, and those are bad enough. (hard pass on even trying this out, especially if it&#x27;s good&#x2F;nice I&#x27;ll want to use it and kick myself later for being an idiot.)
评论 #31031909 未加载
bragr大约 3 年前
Cool project but I wonder if the name will catch flak from the lawyers. Trademarks and all that. At they very least a big &quot;This is not affiliated with Google&#x2F;Youtube&quot; seems like a wise precaution.
评论 #31032239 未加载
评论 #31033466 未加载
评论 #31032344 未加载
评论 #31035529 未加载
评论 #31034914 未加载
endisneigh大约 3 年前
If you’re YouTube or any site, and want to stop these sort of wrappers - what’s the easiest way to do so without breaking your own site?<p>I find this task to be an interesting engineering problem.<p>A related question is if there’s an unspoofable way to detect a client.
评论 #31032609 未加载
评论 #31035438 未加载
评论 #31032403 未加载
评论 #31032359 未加载
评论 #31033249 未加载
评论 #31033943 未加载
评论 #31032155 未加载
评论 #31032178 未加载
评论 #31032075 未加载
评论 #31032832 未加载
评论 #31032043 未加载
评论 #31032380 未加载
评论 #31034542 未加载
评论 #31035373 未加载
评论 #31033976 未加载
krick大约 3 年前
I suppose it will break more often than youtube-dl.
评论 #31043441 未加载
imiric大约 3 年前
It would be great if this had a CLI tool, so that it could be used as an alternative to yt-dlp. Or a web frontend as an alternative to Invidious, which breaks more often than not.<p>That said, I wouldn&#x27;t be surprised if Google issues a C&amp;D, or just inevitably breaks it, especially if it uses undocumented APIs.
评论 #31033130 未加载
timoteostewart大约 3 年前
Love this Q&amp;A:<p><pre><code> Do I need an API key to use this? No, YouTube.js does not use any official API so no API keys are required.</code></pre>
评论 #31035531 未加载
cphoover大约 3 年前
I&#x27;m surprised they still support video dislike via API, but have removed it from the user interface... I understand they are likely worried about backwards compatibility with the abundance of client-devices, and not inadvertently breaking some app somewhere, but why not just make it a noop...<p>Unrelated: My treadmill has the absolute worst YT client I&#x27;ve ever used.
评论 #31032476 未加载
评论 #31032456 未加载
评论 #31032978 未加载
freedomben大约 3 年前
I&#x27;ve been wanting to use the Youtube Music API to automate some personal chores (like building&#x2F;cleaning playlists, etc) and was very discouraged. I actually switched to Spotify (trial) partially over it but there were a couple of other (off-topic) reasons I didn&#x27;t want to stay with Spotify.<p>This looks like a wonderful tool! And it&#x27;s not in Python :-D (sorry python people). Like others I&#x27;m a little concerned about breakage as youtube APIs churn. Does anyone know what Youtube&#x27;s approach to backwards compatibility is for internal APIs? Some companies just wait until 98% of user&#x27;s are on the new clients and then rip stuff out, but others I&#x27;ve worked with basically don&#x27;t allow breaking the API except in important circumstances and they stick around deprecated for a while.
评论 #31034177 未加载
评论 #31032300 未加载
评论 #31032297 未加载
londons_explore大约 3 年前
Worth noting that if you automate too much with this API, you&#x27;d be smart to not do it with a Google account you care about, or it&#x27;ll get banned.<p>And they ban any accounts with matching recovery or verification phone numbers and email addresses too, or part of the same gsuite domain.
jokoon大约 3 年前
Sadly, I don&#x27;t think it will let users view video that require login.<p>For example, some 6min show that goes on live french TV everyday got flagged and requires login to be viewed, for age reason.<p>Maybe there was curse words, or some butt-shaped thing in it?
评论 #31033555 未加载
Aulig大约 3 年前
Does the OAuth login give you full access like a cookie login?<p>Personally I&#x27;m using Firebase&#x27;s private API because the public API is missing a couple of features. Currently I just regularly extract my Google cookies from Firefox and use those. But an easy login that grants access to the private API would be cleaner of course.
lpgauth大约 3 年前
Very interesting. Does anyone know how stable the InnerTube API is?
trinovantes大约 3 年前
I&#x27;m always nervous about 3rd party API wrappers. It&#x27;s basically saying &quot;Here&#x27;s the keys to my (users) Google account, please don&#x27;t do anything bad&quot;. Even if it&#x27;s open source, there&#x27;s no guarantee there&#x27;s no malicious change in version x.x.N+1
评论 #31030998 未加载
评论 #31031936 未加载
评论 #31032767 未加载
grammers大约 3 年前
Nice, thanks for sharing!