2014-12-13 20:58:52 +00:00
|
|
|
# coding: utf-8
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
from .common import InfoExtractor
|
|
|
|
|
|
|
|
|
|
|
|
class RestudyIE(InfoExtractor):
|
2014-12-13 21:41:00 +00:00
|
|
|
_VALID_URL = r'https?://(?:www\.)?restudy\.dk/video/play/id/(?P<id>[0-9]+)'
|
2014-12-13 20:58:52 +00:00
|
|
|
_TEST = {
|
|
|
|
'url': 'https://www.restudy.dk/video/play/id/1637',
|
|
|
|
'info_dict': {
|
|
|
|
'id': '1637',
|
2014-12-13 21:41:00 +00:00
|
|
|
'ext': 'flv',
|
2014-12-13 20:58:52 +00:00
|
|
|
'title': 'Leiden-frosteffekt',
|
2014-12-13 21:41:00 +00:00
|
|
|
'description': 'Denne video er et eksperiment med flydende kvælstof.',
|
|
|
|
},
|
|
|
|
'params': {
|
|
|
|
# rtmp download
|
|
|
|
'skip_download': True,
|
2014-12-13 20:58:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
def _real_extract(self, url):
|
|
|
|
video_id = self._match_id(url)
|
2014-12-13 21:41:00 +00:00
|
|
|
|
2014-12-13 20:58:52 +00:00
|
|
|
webpage = self._download_webpage(url, video_id)
|
2014-12-13 21:41:00 +00:00
|
|
|
|
|
|
|
title = self._og_search_title(webpage).strip()
|
|
|
|
description = self._og_search_description(webpage).strip()
|
|
|
|
|
|
|
|
formats = self._extract_smil_formats(
|
2018-01-20 16:19:02 +00:00
|
|
|
'https://cdn.portal.restudy.dk/dynamic/themes/front/awsmedia/SmilDirectory/video_%s.xml' % video_id,
|
2014-12-13 21:41:00 +00:00
|
|
|
video_id)
|
2016-03-27 01:03:08 +00:00
|
|
|
self._sort_formats(formats)
|
2014-12-13 21:41:00 +00:00
|
|
|
|
2014-12-13 20:58:52 +00:00
|
|
|
return {
|
|
|
|
'id': video_id,
|
|
|
|
'title': title,
|
2014-12-13 21:41:00 +00:00
|
|
|
'description': description,
|
|
|
|
'formats': formats,
|
2014-12-13 20:58:52 +00:00
|
|
|
}
|