From 20e9ef470894d0fa44fd042b1d316136f8e7e399 Mon Sep 17 00:00:00 2001 From: Mort Yao Date: Mon, 9 Nov 2015 16:45:32 +0100 Subject: [PATCH] [vine] support card URLs --- src/you_get/extractors/vine.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/you_get/extractors/vine.py b/src/you_get/extractors/vine.py index 2634c022..5c54c5fd 100644 --- a/src/you_get/extractors/vine.py +++ b/src/you_get/extractors/vine.py @@ -8,10 +8,11 @@ def vine_download(url, output_dir='.', merge=True, info_only=False, **kwargs): html = get_html(url) vid = r1(r'vine.co/v/([^/]+)', url) - title1 = r1(r'([^<]*)', html) stream = r1(r'', html) + if not stream: # https://vine.co/v/.../card + stream = r1(r'"videoUrl":"([^"]+)"', html).replace('\\/', '/') + mime, ext, size = url_info(stream) print_info(site_info, title, mime, size)