mirror of
https://github.com/soimort/you-get.git
synced 2025-02-03 00:33:58 +03:00
add support for Tumblr (fix #44)
This commit is contained in:
parent
a681458860
commit
cf721b0c61
@ -1,6 +1,14 @@
|
|||||||
Changelog
|
Changelog
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
0.3dev-20121219
|
||||||
|
---------------
|
||||||
|
|
||||||
|
*Date: 2012-12-19*
|
||||||
|
|
||||||
|
* Add support for:
|
||||||
|
- Tumblr
|
||||||
|
|
||||||
0.3dev-20121217
|
0.3dev-20121217
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ Fork me on GitHub: <https://github.com/soimort/you-get>
|
|||||||
* Vimeo <http://vimeo.com>
|
* Vimeo <http://vimeo.com>
|
||||||
* Dailymotion <http://dailymotion.com>
|
* Dailymotion <http://dailymotion.com>
|
||||||
* Google+ <http://plus.google.com>
|
* Google+ <http://plus.google.com>
|
||||||
|
* Tumblr <http://www.tumblr.com>
|
||||||
* SoundCloud <http://soundcloud.com>
|
* SoundCloud <http://soundcloud.com>
|
||||||
* Youku (优酷) <http://www.youku.com>
|
* Youku (优酷) <http://www.youku.com>
|
||||||
* Tudou (土豆) <http://www.tudou.com>
|
* Tudou (土豆) <http://www.tudou.com>
|
||||||
@ -203,6 +204,7 @@ You-Get基于优酷下载脚本[iambus/youku-lixian](https://github.com/iambus/y
|
|||||||
* Vimeo <http://vimeo.com>
|
* Vimeo <http://vimeo.com>
|
||||||
* Dailymotion <http://dailymotion.com>
|
* Dailymotion <http://dailymotion.com>
|
||||||
* Google+ <http://plus.google.com>
|
* Google+ <http://plus.google.com>
|
||||||
|
* Tumblr <http://www.tumblr.com>
|
||||||
* SoundCloud <http://soundcloud.com>
|
* SoundCloud <http://soundcloud.com>
|
||||||
* 优酷 <http://www.youku.com>
|
* 优酷 <http://www.youku.com>
|
||||||
* 土豆 <http://www.tudou.com>
|
* 土豆 <http://www.tudou.com>
|
||||||
|
@ -17,6 +17,7 @@ Supported Sites (As of Now)
|
|||||||
* Vimeo http://vimeo.com
|
* Vimeo http://vimeo.com
|
||||||
* Dailymotion http://dailymotion.com
|
* Dailymotion http://dailymotion.com
|
||||||
* Google+ http://plus.google.com
|
* Google+ http://plus.google.com
|
||||||
|
* Tumblr http://www.tumblr.com
|
||||||
* SoundCloud http://soundcloud.com
|
* SoundCloud http://soundcloud.com
|
||||||
* Youku (优酷) http://www.youku.com
|
* Youku (优酷) http://www.youku.com
|
||||||
* Tudou (土豆) http://www.tudou.com
|
* Tudou (土豆) http://www.tudou.com
|
||||||
|
@ -14,6 +14,7 @@ from .sina import *
|
|||||||
from .sohu import *
|
from .sohu import *
|
||||||
from .soundcloud import *
|
from .soundcloud import *
|
||||||
from .tudou import *
|
from .tudou import *
|
||||||
|
from .tumblr import *
|
||||||
from .vimeo import *
|
from .vimeo import *
|
||||||
from .w56 import *
|
from .w56 import *
|
||||||
from .yinyuetai import *
|
from .yinyuetai import *
|
||||||
|
24
you_get/downloader/tumblr.py
Normal file
24
you_get/downloader/tumblr.py
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
__all__ = ['tumblr_download']
|
||||||
|
|
||||||
|
from ..common import *
|
||||||
|
|
||||||
|
import re
|
||||||
|
|
||||||
|
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)
|
||||||
|
real_url = r1(r'source src=\\x22([^\\]+)\\', html)
|
||||||
|
|
||||||
|
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 = "Tumblr.com"
|
||||||
|
download = tumblr_download
|
||||||
|
download_playlist = playlist_not_supported('tumblr')
|
@ -36,6 +36,7 @@ def url_to_module(url):
|
|||||||
'sohu': sohu,
|
'sohu': sohu,
|
||||||
'soundcloud': soundcloud,
|
'soundcloud': soundcloud,
|
||||||
'tudou': tudou,
|
'tudou': tudou,
|
||||||
|
'tumblr': tumblr,
|
||||||
'vimeo': vimeo,
|
'vimeo': vimeo,
|
||||||
'yinyuetai': yinyuetai,
|
'yinyuetai': yinyuetai,
|
||||||
'youku': youku,
|
'youku': youku,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
__version__ = '0.3dev-20121217'
|
__version__ = '0.3dev-20121219'
|
||||||
__date__ = '2012-12-17'
|
__date__ = '2012-12-19'
|
||||||
|
Loading…
Reference in New Issue
Block a user