2014-04-26 12:55:29 -04:00
|
|
|
from .common import InfoExtractor
|
|
|
|
|
|
|
|
|
|
|
|
class MoviezineIE(InfoExtractor):
|
2016-09-08 07:29:05 -04:00
|
|
|
_VALID_URL = r'https?://(?:www\.)?moviezine\.se/video/(?P<id>[^?#]+)'
|
2014-04-26 12:55:29 -04:00
|
|
|
|
|
|
|
_TEST = {
|
|
|
|
'url': 'http://www.moviezine.se/video/205866',
|
|
|
|
'info_dict': {
|
|
|
|
'id': '205866',
|
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'Oculus - Trailer 1',
|
|
|
|
'description': 'md5:40cc6790fc81d931850ca9249b40e8a4',
|
2017-01-02 07:08:07 -05:00
|
|
|
'thumbnail': r're:http://.*\.jpg',
|
2014-04-26 12:55:29 -04:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
def _real_extract(self, url):
|
2021-08-18 21:41:24 -04:00
|
|
|
mobj = self._match_valid_url(url)
|
2014-04-26 12:55:29 -04:00
|
|
|
video_id = mobj.group('id')
|
|
|
|
|
|
|
|
webpage = self._download_webpage(url, video_id)
|
2024-06-11 19:09:58 -04:00
|
|
|
jsplayer = self._download_webpage(f'http://www.moviezine.se/api/player.js?video={video_id}', video_id, 'Downloading js api player')
|
2014-04-26 12:55:29 -04:00
|
|
|
|
2014-11-23 14:41:03 -05:00
|
|
|
formats = [{
|
2014-04-26 12:55:29 -04:00
|
|
|
'format_id': 'sd',
|
|
|
|
'url': self._html_search_regex(r'file: "(.+?)",', jsplayer, 'file'),
|
|
|
|
'quality': 0,
|
|
|
|
'ext': 'mp4',
|
|
|
|
}]
|
|
|
|
|
|
|
|
return {
|
|
|
|
'id': video_id,
|
|
|
|
'title': self._search_regex(r'title: "(.+?)",', jsplayer, 'title'),
|
|
|
|
'thumbnail': self._search_regex(r'image: "(.+?)",', jsplayer, 'image'),
|
|
|
|
'formats': formats,
|
|
|
|
'description': self._og_search_description(webpage),
|
|
|
|
}
|