From b9d09a282dfe59658e7b267efd0241dbf9838b0a Mon Sep 17 00:00:00 2001 From: winwon Date: Mon, 24 Mar 2014 12:09:07 +0000 Subject: [PATCH 1/3] Update veoh.py --- youtube_dl/extractor/veoh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/veoh.py b/youtube_dl/extractor/veoh.py index c90feefd2..4fe26cde2 100644 --- a/youtube_dl/extractor/veoh.py +++ b/youtube_dl/extractor/veoh.py @@ -8,7 +8,7 @@ from ..utils import compat_urllib_request class VeohIE(InfoExtractor): - _VALID_URL = r'http://(?:www\.)?veoh\.com/(?:watch|iphone/#_Watch)/v(?P\d*)' + _VALID_URL = r'http://(?:www\.)?veoh\.com/(?:watch|iphone/#_Watch)/v(?P.+)' _TEST = { 'url': 'http://www.veoh.com/watch/v56314296nk7Zdmz3', From 97802cf6afcf6042c8544f35567ba888ce5058c8 Mon Sep 17 00:00:00 2001 From: winwon Date: Fri, 17 Oct 2014 17:38:16 +0100 Subject: [PATCH 2/3] vidzi Add new extractor --- youtube_dl/extractor/__init__.py | 2 +- youtube_dl/extractor/vidzi.py | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 youtube_dl/extractor/vidzi.py diff --git a/youtube_dl/extractor/__init__.py b/youtube_dl/extractor/__init__.py index 245860140..fd0bc57f0 100644 --- a/youtube_dl/extractor/__init__.py +++ b/youtube_dl/extractor/__init__.py @@ -317,7 +317,7 @@ from .youtube import ( YoutubeWatchLaterIE, ) from .zdf import ZDFIE - +from .vidzi import VidziIE _ALL_CLASSES = [ klass diff --git a/youtube_dl/extractor/vidzi.py b/youtube_dl/extractor/vidzi.py new file mode 100644 index 000000000..7d93dd301 --- /dev/null +++ b/youtube_dl/extractor/vidzi.py @@ -0,0 +1,30 @@ +import re +from .common import InfoExtractor + +class VidziIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?vidzi\.tv/(?P\w+)' + _TEST = { + 'url': 'http://vidzi.tv/m1chxrwq7bx9', + 'md5': '5c4c4a8ca2281a199c8eefe8f411d630', + 'info_dict': { + 'id': 'm1chxrwq7bx9', + 'ext': 'mp4', + 'title': 'Watch Cadbury Dream Factory S01E04 HDTV x264 FiHTV mp4', + }, + } + + def _real_extract(self, url): + mobj = re.match(self._VALID_URL, url) + video_id = mobj.group('id') + + webpage = self._download_webpage('http://vidzi.tv/' + video_id, video_id) + video_url = self._html_search_regex(r'{\s*file\s*:\s*"([^"]+)"\s*}', webpage, u'vidzi url') + title = self._html_search_regex(r'([^<]+)<\/Title>', webpage, u'vidzi title') + + return { + 'id': video_id, + 'title': title, + 'url': video_url, + 'ext': 'mp4', + } + \ No newline at end of file From 472c98900d0ca953bdb070c4e81e9fd0b05d8730 Mon Sep 17 00:00:00 2001 From: winwon <wish4read@gmail.com> Date: Mon, 20 Oct 2014 11:29:08 +0100 Subject: [PATCH 3/3] Vidzi Add new extractor, changed the import order and uploaded a video and create the test data (cherry picked from commit 4b7c01dca61e8b453d4130137d666aed94ea0f1a) --- youtube_dl/extractor/__init__.py | 3 ++- youtube_dl/extractor/vidzi.py | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/youtube_dl/extractor/__init__.py b/youtube_dl/extractor/__init__.py index fd0bc57f0..1359581ec 100644 --- a/youtube_dl/extractor/__init__.py +++ b/youtube_dl/extractor/__init__.py @@ -268,6 +268,7 @@ from .videodetective import VideoDetectiveIE from .videolecturesnet import VideoLecturesNetIE from .videofyme import VideofyMeIE from .videopremium import VideoPremiumIE +from .vidzi import VidziIE from .vimeo import ( VimeoIE, VimeoChannelIE, @@ -317,7 +318,7 @@ from .youtube import ( YoutubeWatchLaterIE, ) from .zdf import ZDFIE -from .vidzi import VidziIE + _ALL_CLASSES = [ klass diff --git a/youtube_dl/extractor/vidzi.py b/youtube_dl/extractor/vidzi.py index 7d93dd301..b8fa1954f 100644 --- a/youtube_dl/extractor/vidzi.py +++ b/youtube_dl/extractor/vidzi.py @@ -4,12 +4,12 @@ from .common import InfoExtractor class VidziIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?vidzi\.tv/(?P<id>\w+)' _TEST = { - 'url': 'http://vidzi.tv/m1chxrwq7bx9', - 'md5': '5c4c4a8ca2281a199c8eefe8f411d630', + 'url': 'http://vidzi.tv/h8gbz2rn51vk.html', + 'md5': '4a48137d9fa8a7d848a64485aed68889', 'info_dict': { - 'id': 'm1chxrwq7bx9', + 'id': 'h8gbz2rn51vk', 'ext': 'mp4', - 'title': 'Watch Cadbury Dream Factory S01E04 HDTV x264 FiHTV mp4', + 'title': 'Watch my4 mp4', }, }