add support for Tumblr audios (fix #50)

This commit is contained in:
Mort Yao 2012-12-27 13:21:47 +01:00
parent 7c5f267e2a
commit f58ff20862
3 changed files with 14 additions and 3 deletions

View File

@ -1,6 +1,15 @@
Changelog
=========
0.3dev-20121228
---------------
*Date: 2012-12-28*
* Add support for:
- Xiami
- Tumblr audios
0.3dev-20121221
---------------

View File

@ -10,8 +10,10 @@ def tumblr_download(url, output_dir = '.', merge = True, info_only = False):
html = get_html(url)
html = parse.unquote(html).replace('\/', '/')
title = r1(r'<title>(.*)</title>', html) or r1(r'<title>(.*)\n', html)
title = unescape_html(r1(r'<meta property="og:title" content="([^"]*)" />', html))
real_url = r1(r'source src=\\x22([^\\]+)\\', html)
if not real_url:
real_url = r1(r'audio_file=([^&]+)&', html) + '?plead=please-dont-download-this-or-our-lawyers-wont-let-us-host-audio'
type, ext, size = url_info(real_url)

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
__version__ = '0.3dev-20121221'
__date__ = '2012-12-21'
__version__ = '0.3dev-20121228'
__date__ = '2012-12-28'