mirror of
https://github.com/l1ving/youtube-dl
synced 2025-02-03 03:52:56 +08:00
[DmdaMedia] Add new extractor
This commit is contained in:
parent
3526c3043b
commit
ff02ee85da
34
youtube_dl/extractor/dmdamedia.py
Normal file
34
youtube_dl/extractor/dmdamedia.py
Normal 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'
|
||||||
|
}
|
@ -293,6 +293,7 @@ from .discoverynetworks import DiscoveryNetworksDeIE
|
|||||||
from .discoveryvr import DiscoveryVRIE
|
from .discoveryvr import DiscoveryVRIE
|
||||||
from .disney import DisneyIE
|
from .disney import DisneyIE
|
||||||
from .dispeak import DigitallySpeakingIE
|
from .dispeak import DigitallySpeakingIE
|
||||||
|
from .dmdamedia import DmdaMediaIE
|
||||||
from .dropbox import DropboxIE
|
from .dropbox import DropboxIE
|
||||||
from .dw import (
|
from .dw import (
|
||||||
DWIE,
|
DWIE,
|
||||||
|
Loading…
Reference in New Issue
Block a user