you-get/src/you_get/extractor/vine.py

21 lines
586 B
Python
Raw Normal View History

2013-03-22 07:31:28 +04:00
#!/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)
2013-12-08 08:54:32 +04:00
url = "http:" + r1(r'<source src="([^"]*)"', html)
2013-03-22 07:31:28 +04:00
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')