mirror of
https://github.com/soimort/you-get.git
synced 2025-03-13 03:17:44 +03:00
add support for Vine.co, fix #134
This commit is contained in:
parent
df740c10e2
commit
9027ed92e0
@ -48,6 +48,7 @@ def url_to_module(url):
|
||||
'tumblr': tumblr,
|
||||
'vid48': vid48,
|
||||
'vimeo': vimeo,
|
||||
'vine': vine,
|
||||
'xiami': xiami,
|
||||
'yinyuetai': yinyuetai,
|
||||
'youku': youku,
|
||||
|
@ -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 *
|
||||
|
20
src/you_get/downloader/vine.py
Normal file
20
src/you_get/downloader/vine.py
Normal file
@ -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'<meta property="og:title" content="([^"]*)"', html)
|
||||
url = r1(r'<source src="([^"]*)"', html)
|
||||
type, ext, size = url_info(url)
|
||||
|
||||
print_info(site_info, title, type, size)
|
||||
if not info_only:
|
||||
download_urls([url], title, ext, size, output_dir, merge = merge)
|
||||
|
||||
site_info = "Vine.co"
|
||||
download = vine_download
|
||||
download_playlist = playlist_not_supported('vine')
|
Loading…
x
Reference in New Issue
Block a user