1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-02 22:03:02 +08:00

[DmdaMedia] Add new extractor

This commit is contained in:
Uzonyi Ákos 2018-03-15 23:48:08 +01:00
parent 3526c3043b
commit ff02ee85da
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,34 @@
# coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
class DmdaMediaIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?dmdamedia\.hu/(?P<id>[^/]+).*'
_TEST = {
'url': 'http://dmdamedia.hu/vasott_szulok/3.evad/3.resz?a=2',
'info_dict': {
'id': '9tgrrmz55f7q',
'ext': 'mp4',
'title': 'Vásott szülők 3. Évad 3. Rész Online dmdamedia.hu',
}
}
def _real_extract(self, url):
url_match = re.match(self._VALID_URL, url)
video_id = url_match.group('id')
webpage = self._download_webpage(url, video_id)
title = self._html_search_regex(r'<title>(.+?)</title>', webpage, 'title', default=None)
url = self._html_search_regex(r'<iframe[^>]*?src=\"(.*?)\"', webpage, 'url')
return {
'id': video_id,
'title': title,
'url': url,
'_type': 'url_transparent'
}

View File

@ -293,6 +293,7 @@ from .discoverynetworks import DiscoveryNetworksDeIE
from .discoveryvr import DiscoveryVRIE
from .disney import DisneyIE
from .dispeak import DigitallySpeakingIE
from .dmdamedia import DmdaMediaIE
from .dropbox import DropboxIE
from .dw import (
DWIE,