diff options
author | Sergey M․ <dstftw@gmail.com> | 2014-09-12 18:18:26 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2014-09-12 18:18:26 +0700 |
commit | 8fb7ff25c5056ed0f23f35129bb0d6eba5dd6555 (patch) | |
tree | a2e6c1c8c59f2c542df7f77649de8b9e629c4f64 /youtube_dl/extractor | |
parent | de00ff6494c1852c7c5bf7a2d13208203b5eb27c (diff) | |
parent | 09334400861bdd8600e68f555eea8d4d6f3c7155 (diff) |
Merge branch 'master' of https://github.com/Lovius/youtube-dl into Lovius-master
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r-- | youtube_dl/extractor/__init__.py | 1 | ||||
-rw-r--r-- | youtube_dl/extractor/telemb.py | 40 |
2 files changed, 41 insertions, 0 deletions
diff --git a/youtube_dl/extractor/__init__.py b/youtube_dl/extractor/__init__.py index 6b29e9fdd..94e370281 100644 --- a/youtube_dl/extractor/__init__.py +++ b/youtube_dl/extractor/__init__.py @@ -345,6 +345,7 @@ from .teachingchannel import TeachingChannelIE from .teamcoco import TeamcocoIE from .techtalks import TechTalksIE from .ted import TEDIE +from .telemb import TelembIE from .tenplay import TenPlayIE from .testurl import TestURLIE from .tf1 import TF1IE diff --git a/youtube_dl/extractor/telemb.py b/youtube_dl/extractor/telemb.py new file mode 100644 index 000000000..383c26d96 --- /dev/null +++ b/youtube_dl/extractor/telemb.py @@ -0,0 +1,40 @@ +import re +# -*- coding: utf-8 -*- +# needed for the title french ê! coding utf-8- -*- +# based on the vine.co and lots of help from https://filippo.io/add-support-for-a-new-video-site-to-youtube-dl/ +from .common import InfoExtractor + + +class TelembIE(InfoExtractor): + + _VALID_URL = r'https?://www\.telemb\.be/(?P<id>.*)' + + _TEST = { + u'url': u'http://www.telemb.be/mons-cook-with-danielle-des-cours-de-cuisine-en-anglais-_d_13466.html', + u'file': u'mons-cook-with-danielle-des-cours-de-cuisine-en-anglais-_d_13466.html.mp4', + u'md5': u'f45ea69878516ba039835794e0f8f783', + u'info_dict': { + u"title": u'TéléMB : Mons - Cook with Danielle : des cours de cuisine en anglais ! - Les reportages' + } + } + + def _real_extract(self, url): + mobj = re.match(self._VALID_URL, url) + + video_id = mobj.group('id') + webpage_url = 'http://www.telemb.be/' + video_id + webpage = self._download_webpage(webpage_url, video_id) + + + self.report_extraction(video_id) + + video_url = self._html_search_regex(r'"(http://wowza\.imust\.org/srv/vod/.*\.mp4)"', + webpage, u'video URL') + + return [{ + 'id': video_id, + 'url': video_url, + 'ext': 'mp4', + 'title': self._og_search_title(webpage), + 'thumbnail': self._og_search_thumbnail(webpage), + }] |