]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/moviezine.py
43146180ad2b272104cb2234de3f4482e7c330fb
1 # -*- coding: utf-8 -*-
2 from __future__
import unicode_literals
6 from .common
import InfoExtractor
9 class MoviezineIE(InfoExtractor
):
10 _VALID_URL
= r
'https?://www\.moviezine\.se/video/(?P<id>[^?#]+)'
13 'url': 'http://www.moviezine.se/video/205866',
17 'title': 'Oculus - Trailer 1',
18 'description': 'md5:40cc6790fc81d931850ca9249b40e8a4',
19 'thumbnail': 're:http://.*\.jpg',
23 def _real_extract(self
, url
):
24 mobj
= re
.match(self
._VALID
_URL
, url
)
25 video_id
= mobj
.group('id')
27 webpage
= self
._download
_webpage
(url
, video_id
)
28 jsplayer
= self
._download
_webpage
('http://www.moviezine.se/api/player.js?video=%s' % video_id
, video_id
, 'Downloading js api player')
32 'url': self
._html
_search
_regex
(r
'file: "(.+?)",', jsplayer
, 'file'),
37 self
._sort
_formats
(formats
)
41 'title': self
._search
_regex
(r
'title: "(.+?)",', jsplayer
, 'title'),
42 'thumbnail': self
._search
_regex
(r
'image: "(.+?)",', jsplayer
, 'image'),
44 'description': self
._og
_search
_description
(webpage
),