mirror of
https://github.com/soimort/you-get.git
synced 2025-02-03 00:33:58 +03:00
Vine: add video id into title
This commit is contained in:
parent
c058e14059
commit
c7cc66458f
@ -6,13 +6,13 @@ from ..common import *
|
||||
|
||||
def instagram_download(url, output_dir = '.', merge = True, info_only = False):
|
||||
html = get_html(url)
|
||||
|
||||
id = r1(r'instagram.com/p/([^/]+)/', html)
|
||||
|
||||
vid = r1(r'instagram.com/p/([^/]+)/', html)
|
||||
description = r1(r'<meta property="og:description" content="([^"]*)"', html)
|
||||
title = description + " [" + id + "]"
|
||||
title = description + " [" + vid + "]"
|
||||
url = r1(r'<meta property="og:video" content="([^"]*)"', 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)
|
||||
|
@ -7,9 +7,10 @@ from ..common import *
|
||||
def vine_download(url, output_dir='.', merge=True, info_only=False):
|
||||
html = get_html(url)
|
||||
|
||||
vid = r1(r'vine.co/v/([^/]+)/', html)
|
||||
title1 = r1(r'<meta property="twitter:title" content="([^"]*)"', html)
|
||||
title2 = r1(r'<meta property="og:title" content="([^"]*)"', html)
|
||||
title = "%s - %s" % (title1, title2)
|
||||
title2 = r1(r'<meta property="twitter:description" content="([^"]*)"', html)
|
||||
title = "%s - %s" % (title1, title2) + " [" + vid + "]"
|
||||
url = r1(r'<source src="([^"]*)"', html) or r1(r'<meta itemprop="contentURL" content="([^"]*)"', html)
|
||||
if url[0:2] == "//":
|
||||
url = "http:" + url
|
||||
|
Loading…
Reference in New Issue
Block a user