aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/vidzi.py
diff options
context:
space:
mode:
authorwinwon <wish4read@gmail.com>2014-10-17 17:38:16 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-10-24 15:15:13 +0200
commit95ee84421e57982f208ec00c314abfabaa3418e8 (patch)
tree7f8fb5341a1c6571f4f314a056b882f0877095b5 /youtube_dl/extractor/vidzi.py
parent2acfe95f58e3dc52864a29f1d5b30e44d75d7b38 (diff)
vidzi Add new extractor
Diffstat (limited to 'youtube_dl/extractor/vidzi.py')
-rw-r--r--youtube_dl/extractor/vidzi.py30
1 files changed, 30 insertions, 0 deletions
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<id>\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>([^<]+)<\/Title>', webpage, u'vidzi title')
+
+ return {
+ 'id': video_id,
+ 'title': title,
+ 'url': video_url,
+ 'ext': 'mp4',
+ }
+ \ No newline at end of file