1 from __future__ import unicode_literals
6 from .common import InfoExtractor
7 from ..utils import unified_strdate
10 class VineIE(InfoExtractor):
11 _VALID_URL = r'https?://(?:www\.)?vine\.co/v/(?P<id>\w+)'
13 'url': 'https://vine.co/v/b9KOOWX7HUx',
14 'md5': '2f36fed6235b16da96ce9b4dc890940d',
19 'description': 'Chicken.',
20 'upload_date': '20130519',
21 'uploader': 'Jack Dorsey',
26 def _real_extract(self, url):
27 mobj = re.match(self._VALID_URL, url)
28 video_id = mobj.group('id')
30 webpage = self._download_webpage('https://vine.co/v/' + video_id, video_id)
32 data = json.loads(self._html_search_regex(
33 r'window\.POST_DATA = { %s: ({.+?}) }' % video_id, webpage, 'vine data'))
37 'url': data['videoLowURL'],
42 'url': data['videoUrl'],
44 'format_id': 'standard',
50 'title': self._og_search_title(webpage),
51 'description': data['description'],
52 'thumbnail': data['thumbnailUrl'],
53 'upload_date': unified_strdate(data['created']),
54 'uploader': data['username'],
55 'uploader_id': data['userIdStr'],
56 'like_count': data['likes']['count'],
57 'comment_count': data['comments']['count'],
58 'repost_count': data['reposts']['count'],