mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 13:35:16 +03:00
version 0.2
This commit is contained in:
parent
93d23e050e
commit
0f94b999f6
@ -1,6 +1,23 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
0.2
|
||||
---
|
||||
|
||||
*Date: 2012-09-02*
|
||||
|
||||
* Add support for:
|
||||
- Vimeo
|
||||
- AcFun
|
||||
- bilibili
|
||||
- CNTV
|
||||
- iQIYI
|
||||
- Ku6
|
||||
- PPTV
|
||||
- Sina
|
||||
- Sohu
|
||||
- 56
|
||||
|
||||
0.1.3
|
||||
-----
|
||||
|
||||
|
81
README.md
81
README.md
@ -1,6 +1,6 @@
|
||||
# You-Get
|
||||
|
||||
[You-Get](https://github.com/soimort/you-get) is a video downloader runs on Python 3. It aims at easing the download of videos on [YouTube](http://www.youtube.com), [Youku](http://www.youku.com)/[Tudou](http://www.tudou.com) (biggest online video providers in China), etc., in one tool.
|
||||
[You-Get](https://github.com/soimort/you-get) is a video downloader runs on Python 3. It aims at easing the download of videos on [YouTube](http://www.youtube.com), [Youku](http://www.youku.com)/[Tudou](http://www.tudou.com) (biggest online video providers in China), etc., in one script.
|
||||
|
||||
See the project homepage <http://www.soimort.org/you-get> for further documentation.
|
||||
|
||||
@ -8,12 +8,22 @@ Fork me on GitHub: <https://github.com/soimort/you-get>
|
||||
|
||||
## Features
|
||||
|
||||
### Supported Sites (UPDATING!)
|
||||
### Supported Sites (As of Now)
|
||||
|
||||
* YouTube <http://www.youtube.com>
|
||||
* Youku <http://www.youku.com>
|
||||
* Tudou <http://www.tudou.com>
|
||||
* YinYueTai <http://www.yinyuetai.com>
|
||||
* Vimeo <http://vimeo.com>
|
||||
* Youku (优酷) <http://www.youku.com>
|
||||
* Tudou (土豆) <http://www.tudou.com>
|
||||
* YinYueTai (音悦台) <http://www.yinyuetai.com>
|
||||
* AcFun <http://www.acfun.tv>
|
||||
* bilibili <http://www.bilibili.tv>
|
||||
* CNTV (中国网络电视台) <http://www.cntv.cn>
|
||||
* iQIYI (爱奇艺) <http://www.iqiyi.com>
|
||||
* Ku6 (酷6网) <http://www.ku6.com>
|
||||
* PPTV <http://www.pptv.com>
|
||||
* Sina (新浪视频) <http://video.sina.com.cn>
|
||||
* Sohu (搜狐视频) <http://tv.sohu.com>
|
||||
* 56 (56网) <http://www.56.com>
|
||||
|
||||
### Supported Video Formats
|
||||
|
||||
@ -26,7 +36,7 @@ Fork me on GitHub: <https://github.com/soimort/you-get>
|
||||
|
||||
### 1. Install via [Pip](http://www.pip-installer.org/):
|
||||
|
||||
$ pip install you_get
|
||||
$ pip install you-get
|
||||
|
||||
Check if the installation was successful:
|
||||
|
||||
@ -34,7 +44,7 @@ Fork me on GitHub: <https://github.com/soimort/you-get>
|
||||
|
||||
### 2. Install via [EasyInstall](http://pypi.python.org/pypi/setuptools):
|
||||
|
||||
$ easy_install you_get
|
||||
$ easy_install you-get
|
||||
|
||||
Check if the installation was successful:
|
||||
|
||||
@ -54,17 +64,15 @@ Fork me on GitHub: <https://github.com/soimort/you-get>
|
||||
|
||||
$ make install
|
||||
|
||||
Or:
|
||||
Or (on Windows):
|
||||
|
||||
> setup.py install
|
||||
|
||||
on Windows.
|
||||
|
||||
Check if the installation was successful:
|
||||
|
||||
$ you-get -V
|
||||
|
||||
### 4. Clone the Git repository (RECOMMENDED!):
|
||||
### 4. Install from Git:
|
||||
|
||||
$ git clone git://github.com/soimort/you-get.git
|
||||
|
||||
@ -77,12 +85,10 @@ Fork me on GitHub: <https://github.com/soimort/you-get>
|
||||
|
||||
$ make install
|
||||
|
||||
Or:
|
||||
Or (on Windows):
|
||||
|
||||
> setup.py install
|
||||
|
||||
on Windows.
|
||||
|
||||
Check if the installation was successful:
|
||||
|
||||
$ you-get -V
|
||||
@ -101,13 +107,13 @@ Download multiple videos:
|
||||
|
||||
$ you-get http://www.youtube.com/watch?v=sGwy8DsUJ4M http://www.youtube.com/watch?v=8bQlxQJEzLk
|
||||
|
||||
By default, program will skip any video that already exists in the local directory when downloading. If a temporary file (ends with a filename extension ".download") exists, program will resume this download.
|
||||
By default, program will skip any video that already exists in the local directory when downloading. If a temporary file (ends with a ".download" filename extension) is found, program will resume the download from last session.
|
||||
|
||||
To enforce the re-downloading of videos, use '-f' option (this will overwrite any existing video or temporary file, rather than skipping or resuming them):
|
||||
To enforce re-downloading of videos, use '-f' option (this will overwrite any existing video or temporary file, rather than skipping or resuming them):
|
||||
|
||||
$ you-get -f http://www.youtube.com/watch?v=sGwy8DsUJ4M
|
||||
|
||||
Set the output directory of downloaded files:
|
||||
Set the output directory for downloaded files:
|
||||
|
||||
$ you-get -o ~/Downloads http://www.youtube.com/watch?v=sGwy8DsUJ4M
|
||||
|
||||
@ -127,12 +133,12 @@ For a complete list of all available options, see:
|
||||
|
||||
## Examples (For Developers)
|
||||
|
||||
In Python 3.2 (interactive):
|
||||
In Python 3 (interactive):
|
||||
|
||||
>>> import you_get
|
||||
|
||||
>>> you_get.__version__
|
||||
'0.1'
|
||||
'0.2'
|
||||
|
||||
>>> you_get.youtube_download("http://www.youtube.com/watch?v=8bQlxQJEzLk", info_only = True)
|
||||
Video Site: YouTube.com
|
||||
@ -145,6 +151,7 @@ In Python 3.2 (interactive):
|
||||
Title: Mort from Madagascar LIKES
|
||||
Type: WebM video (video/webm)
|
||||
Size: 1.78 MB (1867072 Bytes)
|
||||
|
||||
Downloading Mort from Madagascar LIKES.webm ...
|
||||
100.0% ( 1.8/1.8 MB) [========================================] 1/1
|
||||
|
||||
@ -166,24 +173,38 @@ You-Get is licensed under the [MIT license](https://raw.github.com/soimort/you-g
|
||||
|
||||
[You-Get](https://github.com/soimort/you-get)是一个基于Python 3的视频下载工具。之所以写它的主要原因是,我找不到一个现成的下载工具能够同时支持[YouTube](http://www.youtube.com/)和[优酷](http://www.youku.com/);而且,几乎所有以前的视频下载程序都是基于Python 2的。
|
||||
|
||||
项目主页:<http://www.soimort.org/you-get>
|
||||
|
||||
GitHub地址:<https://github.com/soimort/you-get>
|
||||
|
||||
## 特点
|
||||
|
||||
### 说明
|
||||
|
||||
You-Get基于优酷下载脚本[iambus/youku-lixian](https://github.com/iambus/youku-lixian)用Python 3改写而成,增加了以下功能:
|
||||
|
||||
* 支持YouTube
|
||||
* 支持YouTube、Vimeo等国外视频网站
|
||||
* 支持断点续传
|
||||
* 可设置HTTP代理
|
||||
|
||||
### 支持的站点(持续更新中)
|
||||
### 支持的站点(截至目前)
|
||||
|
||||
目前根据本人需求,仅实现了对有限几个视频站点的支持,以后会继续增加(・∀・)
|
||||
已实现对以下视频站点的支持,以后会陆续增加(・∀・)
|
||||
|
||||
* YouTube <http://www.youtube.com>
|
||||
* Vimeo <http://vimeo.com>
|
||||
* 优酷 <http://www.youku.com>
|
||||
* 土豆 <http://www.tudou.com>
|
||||
* 音悦台 <http://www.yinyuetai.com>
|
||||
* AcFun <http://www.acfun.tv>
|
||||
* bilibili <http://www.bilibili.tv>
|
||||
* CNTV <http://www.cntv.cn>
|
||||
* 爱奇艺 <http://www.iqiyi.com>
|
||||
* 酷6网 <http://www.ku6.com>
|
||||
* PPTV <http://www.pptv.com>
|
||||
* 新浪视频 <http://video.sina.com.cn>
|
||||
* 搜狐视频 <http://tv.sohu.com>
|
||||
* 56网 <http://www.56.com>
|
||||
|
||||
### 输出视频格式
|
||||
|
||||
@ -194,13 +215,13 @@ You-Get基于优酷下载脚本[iambus/youku-lixian](https://github.com/iambus/y
|
||||
|
||||
对于YouTube,程序将下载画质最高的[编码格式](http://en.wikipedia.org/wiki/Youtube#Quality_and_codecs)。
|
||||
|
||||
## 安装方法
|
||||
## 安装说明
|
||||
|
||||
(以下命令均以Linux shell为例)
|
||||
(以下命令格式均以Linux shell为例)
|
||||
|
||||
### 1. 通过[Pip](http://www.pip-installer.org/)安装:
|
||||
|
||||
$ pip install you_get
|
||||
$ pip install you-get
|
||||
|
||||
检查安装是否成功:
|
||||
|
||||
@ -208,7 +229,7 @@ You-Get基于优酷下载脚本[iambus/youku-lixian](https://github.com/iambus/y
|
||||
|
||||
### 2. 通过[EasyInstall](http://pypi.python.org/pypi/setuptools)安装:
|
||||
|
||||
$ easy_install you_get
|
||||
$ easy_install you-get
|
||||
|
||||
检查安装是否成功:
|
||||
|
||||
@ -236,7 +257,7 @@ You-Get基于优酷下载脚本[iambus/youku-lixian](https://github.com/iambus/y
|
||||
|
||||
$ you-get -V
|
||||
|
||||
### 4. 从Git安装(推荐):
|
||||
### 4. 从Git安装:
|
||||
|
||||
$ git clone git://github.com/soimort/you-get.git
|
||||
|
||||
@ -282,6 +303,8 @@ You-Get基于优酷下载脚本[iambus/youku-lixian](https://github.com/iambus/y
|
||||
|
||||
$ you-get -l http://www.youku.com/playlist_show/id_5344313.html
|
||||
|
||||
__注:从0.1.3以后的版本起,`-l`选项不再必须。You-Get可以自动识别并处理播放列表的下载。__
|
||||
|
||||
指定视频文件的下载目录:
|
||||
|
||||
$ you-get -o ~/Downloads http://www.yinyuetai.com/video/463772
|
||||
@ -294,7 +317,7 @@ You-Get基于优酷下载脚本[iambus/youku-lixian](https://github.com/iambus/y
|
||||
|
||||
默认情况下,Python自动使用系统的代理配置。可以通过环境变量`http_proxy`来设置系统的HTTP代理。
|
||||
|
||||
`-x`(`--http-proxy`)选项用于手动指定You-Get所使用的HTTP代理。例如:GoAgent的代理服务器是`http://127.0.0.1:8087`,则使用该代理下载某YouTube视频的命令是:
|
||||
`-x`(`--http-proxy`)选项用于手动指定You-Get所使用的HTTP代理。例如:GoAgent的代理服务器是`http://127.0.0.1:8087`,则通过该代理下载某YouTube视频的命令是:
|
||||
|
||||
$ you-get -x 127.0.0.1:8087 http://www.youtube.com/watch?v=KbtO_Ayjw0M
|
||||
|
||||
@ -308,7 +331,7 @@ Windows下的自由门等翻墙软件会自动设置系统全局代理,因此
|
||||
|
||||
### 断点续传
|
||||
|
||||
下载未完成时意外中止(因为网络中断或程序被强行终止等),在目标路径中会有一个扩展名为`.download`的临时文件。
|
||||
下载未完成时被中止(因为`Ctrl+C`终止程序或者网络中断等原因),在目标路径中会有一个扩展名为`.download`的临时文件。
|
||||
|
||||
下次运行只要在目标路径中找到相应的`.download`临时文件,程序会自动从中断处继续下载。(除非指定了`-f`选项)
|
||||
|
||||
|
45
README.txt
45
README.txt
@ -1,7 +1,7 @@
|
||||
You-Get
|
||||
=======
|
||||
|
||||
`You-Get <https://github.com/soimort/you-get>`_ is a video downloader runs on Python 3. It aims at easing the download of videos on `YouTube <http://www.youtube.com>`_, `Youku <http://www.youku.com>`_/`Tudou <http://www.tudou.com>`_ (biggest online video providers in China), etc., in one tool.
|
||||
`You-Get <https://github.com/soimort/you-get>`_ is a video downloader runs on Python 3. It aims at easing the download of videos on `YouTube <http://www.youtube.com>`_, `Youku <http://www.youku.com>`_/`Tudou <http://www.tudou.com>`_ (biggest online video providers in China), etc., in one script.
|
||||
|
||||
See the project homepage http://www.soimort.org/you-get for further documentation.
|
||||
|
||||
@ -10,13 +10,23 @@ Fork me on GitHub: https://github.com/soimort/you-get
|
||||
Features
|
||||
--------
|
||||
|
||||
Supported Sites (UPDATING!)
|
||||
Supported Sites (As of Now)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
* YouTube http://www.youtube.com
|
||||
* Youku http://www.youku.com
|
||||
* Tudou http://www.tudou.com
|
||||
* YinYueTai http://www.yinyuetai.com
|
||||
* Vimeo http://vimeo.com
|
||||
* Youku (优酷) http://www.youku.com
|
||||
* Tudou (土豆) http://www.tudou.com
|
||||
* YinYueTai (音悦台) http://www.yinyuetai.com
|
||||
* AcFun http://www.acfun.tv
|
||||
* bilibili http://www.bilibili.tv
|
||||
* CNTV (中国网络电视台) http://www.cntv.cn
|
||||
* iQIYI (爱奇艺) http://www.iqiyi.com
|
||||
* Ku6 (酷6网) http://www.ku6.com
|
||||
* PPTV http://www.pptv.com
|
||||
* Sina (新浪视频) http://video.sina.com.cn
|
||||
* Sohu (搜狐视频) http://tv.sohu.com
|
||||
* 56 (56网) http://www.56.com
|
||||
|
||||
Supported Video Formats
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -31,7 +41,7 @@ Installation
|
||||
|
||||
#) Install via `Pip <http://www.pip-installer.org/>`_::
|
||||
|
||||
$ pip install you_get
|
||||
$ pip install you-get
|
||||
|
||||
Check if the installation was successful::
|
||||
|
||||
@ -39,7 +49,7 @@ Installation
|
||||
|
||||
#) Install via `EasyInstall <http://pypi.python.org/pypi/setuptools>`_::
|
||||
|
||||
$ easy_install you_get
|
||||
$ easy_install you-get
|
||||
|
||||
Check if the installation was successful::
|
||||
|
||||
@ -59,17 +69,15 @@ Installation
|
||||
|
||||
$ make install
|
||||
|
||||
Or::
|
||||
Or (on Windows)::
|
||||
|
||||
> setup.py install
|
||||
|
||||
on Windows.
|
||||
|
||||
Check if the installation was successful::
|
||||
|
||||
$ you-get -V
|
||||
|
||||
#) Clone the Git repository (RECOMMENDED!)::
|
||||
#) Install from Git::
|
||||
|
||||
$ git clone git://github.com/soimort/you-get.git
|
||||
|
||||
@ -82,12 +90,10 @@ Installation
|
||||
|
||||
$ make install
|
||||
|
||||
Or::
|
||||
Or (on Windows)::
|
||||
|
||||
> setup.py install
|
||||
|
||||
on Windows.
|
||||
|
||||
Check if the installation was successful::
|
||||
|
||||
$ you-get -V
|
||||
@ -107,13 +113,13 @@ Download multiple videos::
|
||||
|
||||
$ you-get http://www.youtube.com/watch?v=sGwy8DsUJ4M http://www.youtube.com/watch?v=8bQlxQJEzLk
|
||||
|
||||
By default, program will skip any video that already exists in the local directory when downloading. If a temporary file (ends with a filename extension ".download") exists, program will resume this download.
|
||||
By default, program will skip any video that already exists in the local directory when downloading. If a temporary file (ends with a ".download" filename extension) is found, program will resume the download from last session.
|
||||
|
||||
To enforce the re-downloading of videos, use '-f' option (this will overwrite any existing video or temporary file, rather than skipping or resuming them)::
|
||||
To enforce re-downloading of videos, use '-f' option (this will overwrite any existing video or temporary file, rather than skipping or resuming them)::
|
||||
|
||||
$ you-get -f http://www.youtube.com/watch?v=sGwy8DsUJ4M
|
||||
|
||||
Set the output directory of downloaded files::
|
||||
Set the output directory for downloaded files::
|
||||
|
||||
$ you-get -o ~/Downloads http://www.youtube.com/watch?v=sGwy8DsUJ4M
|
||||
|
||||
@ -135,12 +141,12 @@ For a complete list of all available options, see::
|
||||
Examples (For Developers)
|
||||
-------------------------
|
||||
|
||||
In Python 3.2 (interactive)::
|
||||
In Python 3 (interactive)::
|
||||
|
||||
>>> import you_get
|
||||
|
||||
>>> you_get.__version__
|
||||
'0.1'
|
||||
'0.2'
|
||||
|
||||
>>> you_get.youtube_download("http://www.youtube.com/watch?v=8bQlxQJEzLk", info_only = True)
|
||||
Video Site: YouTube.com
|
||||
@ -153,6 +159,7 @@ In Python 3.2 (interactive)::
|
||||
Title: Mort from Madagascar LIKES
|
||||
Type: WebM video (video/webm)
|
||||
Size: 1.78 MB (1867072 Bytes)
|
||||
|
||||
Downloading Mort from Madagascar LIKES.webm ...
|
||||
100.0% ( 1.8/1.8 MB) [========================================] 1/1
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "you-get",
|
||||
"version": "0.1.3",
|
||||
"date": "2012-09-01",
|
||||
"version": "0.2",
|
||||
"date": "2012-09-02",
|
||||
|
||||
"author": "Mort Yao",
|
||||
"author_email": "mort.yao@gmail.com",
|
||||
|
@ -8,13 +8,7 @@ import re
|
||||
import sys
|
||||
from urllib import request, parse
|
||||
|
||||
__version__ = "0.1.3"
|
||||
|
||||
try:
|
||||
proj_info = json.loads(open('you-get.json').read())
|
||||
except:
|
||||
import you_get
|
||||
proj_info = {'version': __version__}
|
||||
__version__ = "0.2"
|
||||
|
||||
force = False
|
||||
|
||||
@ -404,7 +398,7 @@ def set_http_proxy(proxy):
|
||||
request.install_opener(opener)
|
||||
|
||||
def script_main(script_name, download, download_playlist = None):
|
||||
version = 'You-Get %s, a video downloader.' % proj_info['version']
|
||||
version = 'You-Get %s, a video downloader.' % __version__
|
||||
help = 'Usage: %s [OPTION]... [URL]...\n' % script_name
|
||||
help += '''\nStartup options:
|
||||
-V | --version Display the version and exit.
|
||||
|
Loading…
Reference in New Issue
Block a user