java 下载 You Tube 视频?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2498359/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Downloading You tube videos?
提问by lalit
I want to download you tube videos programatically (using Java). How can i convert you tube video link to a downloadable URL.
我想以编程方式(使用 Java)下载您的电子管视频。我如何将您的 Tube 视频链接转换为可下载的 URL。
Browser plays youtube videos with following code.
浏览器使用以下代码播放 youtube 视频。
I tried downloading from URL http://www.youtube.com/v/OdAE3cWlmHwbut it is not returning video bytes.
我尝试从 URL http://www.youtube.com/v/OdAE3cWlmHw下载, 但它没有返回视频字节。
Thanks Lalit
谢谢拉利特
回答by Glen Best
Youtube API allows you to search & list videos and obtain the mediaplayer URL, so that you can play videos within your web page
Youtube API 允许您搜索和列出视频并获取媒体播放器 URL,以便您可以在网页内播放视频
Youtube Java Data API - Search and List Videos
Youtube Java Data API - 搜索和列出视频
Youtube Java Data API - Getting Started
It does not allow you to download the byte content of videos - because Google is protecting their own rights and the rights of the content creators.
它不允许您下载视频的字节内容——因为谷歌正在保护自己的权利和内容创作者的权利。
Google API Terms of Service
Prohibitions:Your API Client will not, and You will not encourage or create functionality for Your users or other third parties to:
...
- promote separately the audio or video components of any YouTube audiovisual content made available through the YouTube API;
- access any portion of any YouTube audiovisual content by any means other than use of a YouTube player or other video player expressly authorized by YouTube;
- store copies of YouTube audiovisual content;
...
您的 API 客户端不会,也不会鼓励或为您的用户或其他第三方创建以下功能:
...
- 单独宣传通过 YouTube API 提供的任何 YouTube 视听内容的音频或视频组件;
- 通过使用 YouTube 播放器或 YouTube 明确授权的其他视频播放器以外的任何方式访问任何 YouTube 视听内容的任何部分;
- 存储 YouTube 视听内容的副本;
...
回答by RvdK
Look at the dosens of extension for Firefox about downloading Flash video's. Downloadhelper and Flash Video Helper. If you look in the source you will find how to download the video. From what i remember is that it parses the HTML page for an id and session and use that in an url to download the video.
查看有关下载 Flash 视频的 Firefox 扩展程序的剂量。下载助手和 Flash 视频助手。如果您查看源代码,您将找到如何下载视频。据我所知,它解析 HTML 页面以获取 ID 和会话,并在 url 中使用它来下载视频。
Similar question found only in C#. Watch the sources and you can recreate it in java C#: Downloading video from YouTube
仅在 C# 中发现的类似问题。观看源代码,您可以在 Java C# 中重新创建它 :从 YouTube 下载视频
回答by www.ilavasam.com
this site has something.. for your need!
这个网站有一些东西……满足你的需要!

