diff --git a/src/you_get/downloader/__init__.py b/src/you_get/downloader/__init__.py index 7a4e315d..9be7e3d6 100644 --- a/src/you_get/downloader/__init__.py +++ b/src/you_get/downloader/__init__.py @@ -38,5 +38,6 @@ from .xiami import * from .yinyuetai import * from .youku import * from .youtube import * +from .ted import * from .__main__ import * diff --git a/src/you_get/downloader/__main__.py b/src/you_get/downloader/__main__.py index 4ce9cbe5..2f5cfbf0 100644 --- a/src/you_get/downloader/__main__.py +++ b/src/you_get/downloader/__main__.py @@ -49,6 +49,7 @@ def url_to_module(url): 'sohu': sohu, 'songtaste':songtaste, 'soundcloud': soundcloud, + 'ted': ted, 'tudou': tudou, 'tumblr': tumblr, 'vid48': vid48, diff --git a/src/you_get/downloader/ted.py b/src/you_get/downloader/ted.py new file mode 100644 index 00000000..167da2a8 --- /dev/null +++ b/src/you_get/downloader/ted.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python + +__all__ = ['ted_download'] + +from ..common import * + +def ted_download(url, output_dir = '.', merge = True, info_only = False): + page = get_html(url).split("\n") + for line in page: + if line.find("