From 9027ed92e02a8d797c21bd5bce68f407ce4dea15 Mon Sep 17 00:00:00 2001 From: Mort Yao Date: Fri, 22 Mar 2013 04:31:28 +0100 Subject: [PATCH] add support for Vine.co, fix #134 --- src/you_get/__main__.py | 1 + src/you_get/downloader/__init__.py | 1 + src/you_get/downloader/vine.py | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 src/you_get/downloader/vine.py diff --git a/src/you_get/__main__.py b/src/you_get/__main__.py index 90a409b5..5821d190 100644 --- a/src/you_get/__main__.py +++ b/src/you_get/__main__.py @@ -48,6 +48,7 @@ def url_to_module(url): 'tumblr': tumblr, 'vid48': vid48, 'vimeo': vimeo, + 'vine': vine, 'xiami': xiami, 'yinyuetai': yinyuetai, 'youku': youku, diff --git a/src/you_get/downloader/__init__.py b/src/you_get/downloader/__init__.py index e5853a2d..3db355bc 100644 --- a/src/you_get/downloader/__init__.py +++ b/src/you_get/downloader/__init__.py @@ -26,6 +26,7 @@ from .tudou import * from .tumblr import * from .vid48 import * from .vimeo import * +from .vine import * from .w56 import * from .xiami import * from .yinyuetai import * diff --git a/src/you_get/downloader/vine.py b/src/you_get/downloader/vine.py new file mode 100644 index 00000000..5ff629b7 --- /dev/null +++ b/src/you_get/downloader/vine.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python + +__all__ = ['vine_download'] + +from ..common import * + +def vine_download(url, output_dir = '.', merge = True, info_only = False): + html = get_html(url) + + title = r1(r'