mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 21:45:02 +03:00
[tumblr] support direct URLs
This commit is contained in:
parent
fbe0d9fdfc
commit
df4076c772
@ -3,10 +3,13 @@
|
||||
__all__ = ['tumblr_download']
|
||||
|
||||
from ..common import *
|
||||
|
||||
import re
|
||||
from .universal import *
|
||||
|
||||
def tumblr_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
|
||||
if re.match(r'https?://\d+\.media\.tumblr\.com/', url):
|
||||
universal_download(url, output_dir, merge=merge, info_only=info_only)
|
||||
return
|
||||
|
||||
html = parse.unquote(get_html(url)).replace('\/', '/')
|
||||
feed = r1(r'<meta property="og:type" content="tumblr-feed:(\w+)" />', html)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user