1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2025-01-07 13:47:54 +01:00

Create uninettuno.py

This commit is contained in:
ipers 2018-02-11 22:09:08 +00:00 committed by GitHub
parent 49702e3669
commit f354422c4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,17 @@
import re
from .common import InfoExtractor
class UninettunoIE(InfoExtractor):
_VALID_URL = r'(?:https?://)?(?:www\.)?uninettuno\.tv/Video.aspx\?v\=(?P<id>\w+)'
def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url)
video_id = mobj.group('id')
webpage_url = 'https://www.uninettuno.tv/Video.aspx?v=' + video_id
webpage = self._download_webpage(webpage_url, video_id)
self.report_extraction(video_id)
video_url = self._html_search_regex(r'[{sources: [{ file: "//(.+?)" ,type: "mp4" }]', webpage, u'video URL')
return [{
'id': video_id,
'url': video_url,
'ext': 'mp4',
'title': self._og_search_title(webpage),
}]