add support for VID48, fix #124

This commit is contained in:
Mort Yao 2013-03-07 16:34:14 +01:00
parent 56e2595a69
commit b474f81f5f
8 changed files with 43 additions and 2 deletions

View File

@ -1,6 +1,14 @@
Changelog Changelog
========= =========
0.3.4
-----
*Date: 2013-03-08*
* Add support for:
- VID48
0.3.3 0.3.3
----- -----

View File

@ -19,6 +19,7 @@ Fork me on GitHub: <https://github.com/soimort/you-get>
* SoundCloud <http://soundcloud.com> * SoundCloud <http://soundcloud.com>
* Mixcloud <http://www.mixcloud.com> * Mixcloud <http://www.mixcloud.com>
* JPopsuki <http://jpopsuki.tv> * JPopsuki <http://jpopsuki.tv>
* VID48 <http://vid48.com>
* Niconico (ニコニコ動画) <http://www.nicovideo.jp> * Niconico (ニコニコ動画) <http://www.nicovideo.jp>
* Youku (优酷) <http://www.youku.com> * Youku (优酷) <http://www.youku.com>
* Tudou (土豆) <http://www.tudou.com> * Tudou (土豆) <http://www.tudou.com>
@ -241,6 +242,7 @@ You-Get基于优酷下载脚本[iambus/youku-lixian](https://github.com/iambus/y
* SoundCloud <http://soundcloud.com> * SoundCloud <http://soundcloud.com>
* Mixcloud <http://www.mixcloud.com> * Mixcloud <http://www.mixcloud.com>
* JPopsuki <http://jpopsuki.tv> * JPopsuki <http://jpopsuki.tv>
* VID48 <http://vid48.com>
* NICONICO动画 <http://www.nicovideo.jp> * NICONICO动画 <http://www.nicovideo.jp>
* 优酷 <http://www.youku.com> * 优酷 <http://www.youku.com>
* 土豆 <http://www.tudou.com> * 土豆 <http://www.tudou.com>

View File

@ -22,6 +22,7 @@ Supported Sites (As of Now)
* SoundCloud http://soundcloud.com * SoundCloud http://soundcloud.com
* Mixcloud http://www.mixcloud.com * Mixcloud http://www.mixcloud.com
* JPopsuki http://jpopsuki.tv * JPopsuki http://jpopsuki.tv
* VID48 http://vid48.com
* Niconico (ニコニコ動画) http://www.nicovideo.jp * Niconico (ニコニコ動画) http://www.nicovideo.jp
* Youku (优酷) http://www.youku.com * Youku (优酷) http://www.youku.com
* Tudou (土豆) http://www.tudou.com * Tudou (土豆) http://www.tudou.com

View File

@ -45,6 +45,7 @@ def url_to_module(url):
'soundcloud': soundcloud, 'soundcloud': soundcloud,
'tudou': tudou, 'tudou': tudou,
'tumblr': tumblr, 'tumblr': tumblr,
'vid48': vid48,
'vimeo': vimeo, 'vimeo': vimeo,
'xiami': xiami, 'xiami': xiami,
'yinyuetai': yinyuetai, 'yinyuetai': yinyuetai,

View File

@ -23,6 +23,7 @@ from .sohu import *
from .soundcloud import * from .soundcloud import *
from .tudou import * from .tudou import *
from .tumblr import * from .tumblr import *
from .vid48 import *
from .vimeo import * from .vimeo import *
from .w56 import * from .w56 import *
from .xiami import * from .xiami import *

View File

@ -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'<title>(.*)</title>', 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')

View File

@ -2,5 +2,5 @@
__all__ = ['__version__', '__date__'] __all__ = ['__version__', '__date__']
__version__ = '0.3.3' __version__ = '0.3.4'
__date__ = '2013-03-01' __date__ = '2013-03-08'

View File

@ -39,6 +39,11 @@ class YouGetTests(unittest.TestCase):
"http://www.mixcloud.com/DJVadim/north-america-are-you-ready/", "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): def test_vimeo(self):
test_urls([ test_urls([
"http://vimeo.com/56810854", "http://vimeo.com/56810854",