1 from __future__ import unicode_literals
5 from .common import InfoExtractor
8 class VineIE(InfoExtractor):
9 _VALID_URL = r'https?://(?:www\.)?vine\.co/v/(?P<id>\w+)'
11 'url': 'https://vine.co/v/b9KOOWX7HUx',
12 'md5': '2f36fed6235b16da96ce9b4dc890940d',
16 'uploader': 'Jack Dorsey',
21 def _real_extract(self, url):
22 mobj = re.match(self._VALID_URL, url)
24 video_id = mobj.group('id')
25 webpage_url = 'https://vine.co/v/' + video_id
26 webpage = self._download_webpage(webpage_url, video_id)
28 self.report_extraction(video_id)
30 video_url = self._html_search_meta('twitter:player:stream', webpage,
33 uploader = self._html_search_regex(r'<p class="username">(.*?)</p>',
34 webpage, 'uploader', fatal=False, flags=re.DOTALL)
40 'title': self._og_search_title(webpage),
41 'thumbnail': self._og_search_thumbnail(webpage),