YouTube 数据 API v3 是否提供视频流 URL? [英] Does YouTube Data API v3 provide video stream URLs?

查看:25
本文介绍了YouTube 数据 API v3 是否提供视频流 URL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 YouTube 数据 API v3,它是否真的能够将所有可用视频和音频流的视频(按 ID)的 URL 返回给我?我有 YouTube 视频 ID.我想选择一个视频流在客户端应用程序中播放.我已阅读本网站上的所有YouTube 数据 API 文档:

Using the YouTube Data API v3, is it actually able to return to me the URL for a video (by ID) of all the available video and audio streams? I have the YouTube video ID. I want to choose a video stream to play in a client app. I've read all the YouTube Data API documentation on this site:

https://developers.google.com/youtube/v3

而且这个问题没有答案;事实上,它似乎有意回避了整个话题.

And this question is not answered; in fact it seems to intentionally avoid this whole topic.

推荐答案

很抱歉不得不给你一个否定的回应:

Sorry for having to give you a negative response:

据我所知,您的问题的答案是否定的,没有这样的 API(和 API 端点)可以提供 YouTube 提供给其视频播放器(嵌入式或非嵌入式)的流的 URL.

As far as I know, the answer to your question is no, there's no such API (and API endpoint for that matter) that will provide the URLs of the streams that YouTube does yield to its video players (embedded or not).

当然,人们可能会从 YouTube 的 Web UI 中抓取此类信息(就像 Internet 上提供的许多工具一样),但是,如果确实观察了 DTOS 规范,最终会遇到 III.一般开发者政策,明确禁止此活动.

Of course, one may scrape this kind of info out of the YouTube's Web UI (like many tools available on the Internet do), but, if one does observe the DTOS specifications, will eventually come across the paragraph E.6 of section III. General Developer Policies, that explicitly forbids this activity.

反对此类 API 存在的论点也可以从 DTOS 文档中得出,同一部分 III.一般开发者政策,但在本例中,来自 E.1 段:

An argument against the existence of such a API can also be derived from the DTOS document, same section III. General Developer Policies, but, in this case, from paragraph E.1:

E.处理 YouTube 数据和内容

除了本部分授予的权限和权利外,您和您的 API 客户端没有进一步的许可或权利API 数据,包括临时存储的API数据.

Aside from the permissions and rights granted in this section, you and your API Clients have no further permissions or rights to API Data, including to temporarily stored API Data.

  1. 视听内容

  1. Audiovisual Content

您和您的 API 客户端不得,并且不得鼓励、促成或要求他人:

You and your API Clients must not, and must not encourage, enable, or require others to:

一个.未经 YouTube 事先书面批准,下载、导入、备份、缓存或存储 YouTube 视听内容的副本,
湾使内容可用于离线播放
C.[...]

a. download, import, backup, cache, or store copies of YouTube audiovisual content without YouTube's prior written approval,
b. make content available for offline playback
c. [...]

由于从 YouTube 下载视频内容是非法的,因此遵循简单的形式逻辑,即不能存在提供视频内容本身 URL 的 API(假设官方 API 与 DTOS 规范在形式上一致).

Since is illegal to download video content from YouTube, it follows by simple formal logic, that it cannot exist an API that would provide URLs to the video content itself (under the assumption that the official APIs are formally consistent with the DTOS specifications).

这篇关于YouTube 数据 API v3 是否提供视频流 URL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆