3 from .common import InfoExtractor
6 class VineIE(InfoExtractor):
7 _VALID_URL = r'(?:https?://)?(?:www\.)?vine\.co/v/(?P<id>\w+)'
9 u'url': u'https://vine.co/v/b9KOOWX7HUx',
10 u'file': u'b9KOOWX7HUx.mp4',
11 u'md5': u'2f36fed6235b16da96ce9b4dc890940d',
13 u"uploader": u"Jack Dorsey",
18 def _real_extract(self, url):
19 mobj = re.match(self._VALID_URL, url)
21 video_id = mobj.group('id')
22 webpage_url = 'https://vine.co/v/' + video_id
23 webpage = self._download_webpage(webpage_url, video_id)
25 self.report_extraction(video_id)
27 video_url = self._html_search_regex(r'<meta property="twitter:player:stream" content="(.+?)"',
28 webpage, u'video URL')
30 uploader = self._html_search_regex(r'<div class="user">.*?<h2>(.+?)</h2>',
31 webpage, u'uploader', fatal=False, flags=re.DOTALL)
37 'title': self._og_search_title(webpage),
38 'thumbnail': self._og_search_thumbnail(webpage),