From: Anna Bernardi Date: Sun, 19 May 2013 22:25:26 +0000 (+0200) Subject: Add support for Vine - closes #845 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=5b0d3cc0cd10c737df20d87aa5842d18549c3c4c;p=youtube-dl Add support for Vine - closes #845 --- diff --git a/test/tests.json b/test/tests.json index 740f7756c..195051556 100644 --- a/test/tests.json +++ b/test/tests.json @@ -451,5 +451,14 @@ "title":"How to Tie a Square Knot Properly", "description":"The square knot, also known as the reef knot, is one of the oldest, most basic knots to tie, and can be used in many different ways. Here's the proper way to tie a square knot." } + }, + { + "name": "Vine", + "url": "https://vine.co/v/b9KOOWX7HUx", + "file": "b9KOOWX7HUx.mp4", + "md5": "2f36fed6235b16da96ce9b4dc890940d", + "info_dict":{ + "title":"Chicken." + } } ] diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py index 938d2d805..551969a2e 100755 --- a/youtube_dl/InfoExtractors.py +++ b/youtube_dl/InfoExtractors.py @@ -4069,8 +4069,8 @@ class InaIE(InfoExtractor): }] class HowcastIE(InfoExtractor): - """Information Extractor for Ina.fr""" - _VALID_URL = r'(?:https?://)?(?:www\.)?howcast\.com/videos/(?P[\d]+)' + """Information Extractor for Howcast.com""" + _VALID_URL = r'(?:https?://)?(?:www\.)?howcast\.com/videos/(?P\d+)' def _real_extract(self, url): mobj = re.match(self._VALID_URL, url) @@ -4104,6 +4104,35 @@ class HowcastIE(InfoExtractor): 'description': video_description, }] +class VineIE(InfoExtractor): + """Information Extractor for Vine.co""" + _VALID_URL = r'(?:https?://)?(?:www\.)?vine\.co/v/(?P\w+)' + + def _real_extract(self, url): + + mobj = re.match(self._VALID_URL, url) + + video_id = mobj.group('id') + webpage_url = 'https://vine.co/v/' + video_id + webpage = self._download_webpage(webpage_url, video_id) + + mobj = re.search(r'