diff --git a/CHANGELOG.txt b/CHANGELOG.txt index c3c6fbeb..d99f3aa3 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,6 +1,14 @@ Changelog ========= +0.3.4 +----- + +*Date: 2013-03-08* + +* Add support for: + - VID48 + 0.3.3 ----- diff --git a/README.md b/README.md index 501a5b32..0ccee7d6 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ Fork me on GitHub: * SoundCloud * Mixcloud * JPopsuki +* VID48 * Niconico (ニコニコ動画) * Youku (优酷) * Tudou (土豆) @@ -241,6 +242,7 @@ You-Get基于优酷下载脚本[iambus/youku-lixian](https://github.com/iambus/y * SoundCloud * Mixcloud * JPopsuki +* VID48 * NICONICO动画 * 优酷 * 土豆 diff --git a/README.txt b/README.txt index cb8a6514..04781ca9 100644 --- a/README.txt +++ b/README.txt @@ -22,6 +22,7 @@ Supported Sites (As of Now) * SoundCloud http://soundcloud.com * Mixcloud http://www.mixcloud.com * JPopsuki http://jpopsuki.tv +* VID48 http://vid48.com * Niconico (ニコニコ動画) http://www.nicovideo.jp * Youku (优酷) http://www.youku.com * Tudou (土豆) http://www.tudou.com diff --git a/src/you_get/__main__.py b/src/you_get/__main__.py index 77889ae0..fe4cd2b0 100644 --- a/src/you_get/__main__.py +++ b/src/you_get/__main__.py @@ -45,6 +45,7 @@ def url_to_module(url): 'soundcloud': soundcloud, 'tudou': tudou, 'tumblr': tumblr, + 'vid48': vid48, 'vimeo': vimeo, 'xiami': xiami, 'yinyuetai': yinyuetai, diff --git a/src/you_get/downloader/__init__.py b/src/you_get/downloader/__init__.py index 3855cb6a..17c3fe13 100644 --- a/src/you_get/downloader/__init__.py +++ b/src/you_get/downloader/__init__.py @@ -23,6 +23,7 @@ from .sohu import * from .soundcloud import * from .tudou import * from .tumblr import * +from .vid48 import * from .vimeo import * from .w56 import * from .xiami import * diff --git a/src/you_get/downloader/vid48.py b/src/you_get/downloader/vid48.py new file mode 100644 index 00000000..fa471148 --- /dev/null +++ b/src/you_get/downloader/vid48.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python + +__all__ = ['vid48_download'] + +from ..common import * + +def vid48_download(url, output_dir = '.', merge = True, info_only = False): + vid = r1(r'v=([^&]*)', url) + p_url = "http://vid48.com/embed_player.php?vid=%s&autoplay=yes" % vid + + html = get_html(p_url) + + title = r1(r'(.*)', html) + url = "http://vid48.com%s" % r1(r'file: "([^"]*)"', html) + type, ext, size = url_info(url) + + print_info(site_info, title, type, size) + if not info_only: + download_urls([url], title, ext, size, output_dir, merge = merge) + +site_info = "VID48" +download = vid48_download +download_playlist = playlist_not_supported('vid48') diff --git a/src/you_get/version.py b/src/you_get/version.py index b8cc2477..94421e3d 100644 --- a/src/you_get/version.py +++ b/src/you_get/version.py @@ -2,5 +2,5 @@ __all__ = ['__version__', '__date__'] -__version__ = '0.3.3' -__date__ = '2013-03-01' +__version__ = '0.3.4' +__date__ = '2013-03-08' diff --git a/tests/test.py b/tests/test.py index fd60ed6b..4d8c27f6 100644 --- a/tests/test.py +++ b/tests/test.py @@ -39,6 +39,11 @@ class YouGetTests(unittest.TestCase): "http://www.mixcloud.com/DJVadim/north-america-are-you-ready/", ]) + def test_vid48(self): + test_urls([ + "http://vid48.com/watch_video.php?v=KXUSG8169U41", + ]) + def test_vimeo(self): test_urls([ "http://vimeo.com/56810854",