diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d99f3aa3..c24dc70e 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -7,6 +7,7 @@ Changelog *Date: 2013-03-08* * Add support for: + - Blip - VID48 0.3.3 diff --git a/README.md b/README.md index 0ccee7d6..9ef1e818 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ Fork me on GitHub: * YouTube * Vimeo +* Blip * Dailymotion * Facebook * Google+ @@ -235,6 +236,7 @@ You-Get基于优酷下载脚本[iambus/youku-lixian](https://github.com/iambus/y * YouTube * Vimeo +* Blip * Dailymotion * Facebook * Google+ diff --git a/README.txt b/README.txt index 04781ca9..946493b6 100644 --- a/README.txt +++ b/README.txt @@ -15,6 +15,7 @@ Supported Sites (As of Now) * YouTube http://www.youtube.com * Vimeo http://vimeo.com +* Blip http://blip.tv * Dailymotion http://dailymotion.com * Facebook http://facebook.com * Google+ http://plus.google.com diff --git a/src/you_get/__main__.py b/src/you_get/__main__.py index fe4cd2b0..90a409b5 100644 --- a/src/you_get/__main__.py +++ b/src/you_get/__main__.py @@ -22,6 +22,7 @@ def url_to_module(url): '56': w56, 'acfun': acfun, 'bilibili': bilibili, + 'blip': blip, 'cntv': cntv, 'dailymotion': dailymotion, 'douban': douban, diff --git a/src/you_get/downloader/__init__.py b/src/you_get/downloader/__init__.py index 17c3fe13..e5853a2d 100644 --- a/src/you_get/downloader/__init__.py +++ b/src/you_get/downloader/__init__.py @@ -2,6 +2,7 @@ from .acfun import * from .bilibili import * +from .blip import * from .cntv import * from .dailymotion import * from .douban import * diff --git a/src/you_get/downloader/blip.py b/src/you_get/downloader/blip.py new file mode 100644 index 00000000..b81a3892 --- /dev/null +++ b/src/you_get/downloader/blip.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python + +__all__ = ['blip_download'] + +from ..common import * + +import json + +def blip_download(url, output_dir = '.', merge = True, info_only = False): + p_url = url + "?skin=json&version=2&no_wrap=1" + html = get_html(p_url) + metadata = json.loads(html) + + title = metadata['Post']['title'] + real_url = metadata['Post']['media']['url'] + type, ext, size = url_info(real_url) + + print_info(site_info, title, type, size) + if not info_only: + download_urls([real_url], title, ext, size, output_dir, merge = merge) + +site_info = "Blip.tv" +download = blip_download +download_playlist = playlist_not_supported('blip') diff --git a/tests/test.py b/tests/test.py index 3e53d34b..7753603b 100644 --- a/tests/test.py +++ b/tests/test.py @@ -12,6 +12,11 @@ def test_urls(urls): class YouGetTests(unittest.TestCase): + def test_blip(self): + test_urls([ + "http://blip.tv/clojure/sam-aaron-programming-music-with-overtone-5970273", + ]) + def test_googleplus(self): test_urls([ "http://plus.google.com/102663035987142737445/posts/jJRu43KQFT5",