]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/vine.py
[extractor/nebula] Add nebula.tv (#4918)
[yt-dlp.git] / yt_dlp / extractor / vine.py
index e59b1037b0df91fcad50714a74a6e6687af8c493..8e57201f68fa852ae7b32499aa6ca7408b052675 100644 (file)
@@ -1,7 +1,3 @@
-# coding: utf-8
-from __future__ import unicode_literals
-
-
 from .common import InfoExtractor
 from ..compat import compat_str
 from ..utils import (
@@ -14,6 +10,7 @@
 
 class VineIE(InfoExtractor):
     _VALID_URL = r'https?://(?:www\.)?vine\.co/(?:v|oembed)/(?P<id>\w+)'
+    _EMBED_REGEX = [r'<iframe[^>]+src=[\'"](?P<url>(?:https?:)?//(?:www\.)?vine\.co/v/[^/]+/embed/(?:simple|postcard))']
     _TESTS = [{
         'url': 'https://vine.co/v/b9KOOWX7HUx',
         'md5': '2f36fed6235b16da96ce9b4dc890940d',
@@ -93,7 +90,7 @@ def video_url(kind):
 
         username = data.get('username')
 
-        alt_title = format_field(username, template='Vine by %s')
+        alt_title = format_field(username, None, 'Vine by %s')
 
         return {
             'id': video_id,