aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-12-12 02:59:52 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-12-12 02:59:52 +0100
commit63e0f295645c768420bdf19b598393799c108652 (patch)
treef2545a39ed5e04e6019d34154bb7ff76c17b0b60
parent42bdd9d0516be5b71c89c9cccde16a880a14b0b1 (diff)
[vine] Modernize
-rw-r--r--youtube_dl/extractor/vine.py25
1 files changed, 10 insertions, 15 deletions
diff --git a/youtube_dl/extractor/vine.py b/youtube_dl/extractor/vine.py
index 4970b2f23..ef3dadeb5 100644
--- a/youtube_dl/extractor/vine.py
+++ b/youtube_dl/extractor/vine.py
@@ -25,26 +25,21 @@ class VineIE(InfoExtractor):
}
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
- video_id = mobj.group('id')
-
+ video_id = self._match_id(url)
webpage = self._download_webpage('https://vine.co/v/' + video_id, video_id)
data = json.loads(self._html_search_regex(
r'window\.POST_DATA = { %s: ({.+?}) }' % video_id, webpage, 'vine data'))
- formats = [
- {
- 'url': data['videoLowURL'],
- 'ext': 'mp4',
- 'format_id': 'low',
- },
- {
- 'url': data['videoUrl'],
- 'ext': 'mp4',
- 'format_id': 'standard',
- }
- ]
+ formats = [{
+ 'url': data['videoLowURL'],
+ 'ext': 'mp4',
+ 'format_id': 'low',
+ }, {
+ 'url': data['videoUrl'],
+ 'ext': 'mp4',
+ 'format_id': 'standard',
+ }]
return {
'id': video_id,