Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
无聊人士张
you-get
提交
7f2f2035
Y
you-get
项目概览
无聊人士张
/
you-get
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
you-get
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7f2f2035
编写于
7月 21, 2014
作者:
M
Mort Yao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix tests
上级
13d40fa6
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
18 addition
and
34 deletion
+18
-34
src/you_get/common.py
src/you_get/common.py
+4
-4
tests/test.py
tests/test.py
+12
-28
tests/test_common.py
tests/test_common.py
+1
-1
tests/test_util.py
tests/test_util.py
+1
-1
未找到文件。
src/you_get/common.py
浏览文件 @
7f2f2035
...
...
@@ -941,7 +941,7 @@ def url_to_module(url):
'baidu'
:
baidu
,
'bilibili'
:
bilibili
,
'blip'
:
blip
,
'catfun'
:
catfun
,
'catfun'
:
catfun
,
'cntv'
:
cntv
,
'cbs'
:
cbs
,
'coursera'
:
coursera
,
...
...
@@ -961,8 +961,8 @@ def url_to_module(url):
'kankanews'
:
bilibili
,
'khanacademy'
:
khan
,
'ku6'
:
ku6
,
'kugou'
:
kugou
,
'kuwo'
:
kuwo
,
'kugou'
:
kugou
,
'kuwo'
:
kuwo
,
'letv'
:
letv
,
'magisto'
:
magisto
,
'miomio'
:
miomio
,
...
...
@@ -974,7 +974,7 @@ def url_to_module(url):
'sina'
:
sina
,
'smgbb'
:
bilibili
,
'sohu'
:
sohu
,
'songtaste'
:
songtaste
,
'songtaste'
:
songtaste
,
'soundcloud'
:
soundcloud
,
'ted'
:
ted
,
'theplatform'
:
theplatform
,
...
...
tests/test.py
浏览文件 @
7f2f2035
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import
unittest
from
you_get
import
*
from
you_get.extractor.__main__
import
url_to_module
def
test_urls
(
urls
):
for
url
in
urls
:
url_to_module
(
url
)[
0
].
download
(
url
,
info_only
=
True
)
from
you_get.extractors
import
*
from
you_get.common
import
*
class
YouGetTests
(
unittest
.
TestCase
):
def
test_freesound
(
self
):
test_urls
([
"http://www.freesound.org/people/Corsica_S/sounds/184419/"
,
])
freesound
.
download
(
"http://www.freesound.org/people/Corsica_S/sounds/184419/"
,
info_only
=
True
)
def
test_magisto
(
self
):
test_urls
([
"http://www.magisto.com/album/video/f3x9AAQORAkfDnIFDA"
,
])
magisto
.
download
(
"http://www.magisto.com/album/video/f3x9AAQORAkfDnIFDA"
,
info_only
=
True
)
def
test_mixcloud
(
self
):
test_urls
([
"http://www.mixcloud.com/beatbopz/beat-bopz-disco-mix/"
,
"http://www.mixcloud.com/DJVadim/north-america-are-you-ready/"
,
])
mixcloud
.
download
(
"http://www.mixcloud.com/beatbopz/beat-bopz-disco-mix/"
,
info_only
=
True
)
mixcloud
.
download
(
"http://www.mixcloud.com/DJVadim/north-america-are-you-ready/"
,
info_only
=
True
)
def
test_ted
(
self
):
test_urls
([
"http://www.ted.com/talks/jennifer_lin_improvs_piano_magic.html"
,
"http://www.ted.com/talks/derek_paravicini_and_adam_ockelford_in_the_key_of_genius.html"
,
])
ted
.
download
(
"http://www.ted.com/talks/jennifer_lin_improvs_piano_magic.html"
,
info_only
=
True
)
ted
.
download
(
"http://www.ted.com/talks/derek_paravicini_and_adam_ockelford_in_the_key_of_genius.html"
,
info_only
=
True
)
def
test_vimeo
(
self
):
test_urls
([
"http://vimeo.com/56810854"
,
])
vimeo
.
download
(
"http://vimeo.com/56810854"
,
info_only
=
True
)
def
test_youtube
(
self
):
test_urls
([
"http://www.youtube.com/watch?v=pzKerr0JIPA"
,
"http://youtu.be/pzKerr0JIPA"
,
"http://www.youtube.com/attribution_link?u=/watch?v%3DldAKIzq7bvs%26feature%3Dshare"
])
youtube
.
download
(
"http://www.youtube.com/watch?v=pzKerr0JIPA"
,
info_only
=
True
)
youtube
.
download
(
"http://youtu.be/pzKerr0JIPA"
,
info_only
=
True
)
youtube
.
download
(
"http://www.youtube.com/attribution_link?u=/watch?v%3DldAKIzq7bvs%26feature%3Dshare"
,
info_only
=
True
)
tests/test_common.py
浏览文件 @
7f2f2035
...
...
@@ -2,7 +2,7 @@
import
unittest
from
you_get
import
*
from
you_get
.common
import
*
class
TestCommon
(
unittest
.
TestCase
):
...
...
tests/test_util.py
浏览文件 @
7f2f2035
...
...
@@ -2,7 +2,7 @@
import
unittest
from
you_get.util
import
*
from
you_get.util
.fs
import
*
class
TestUtil
(
unittest
.
TestCase
):
def
test_legitimize
(
self
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录