mirror of
https://github.com/soimort/you-get.git
synced 2025-03-14 20:04:00 +03:00
[tumblr] fix #901 (2, embedded vine videos)
This commit is contained in:
parent
a9f063f2e8
commit
13168259f9
@ -6,6 +6,7 @@ from ..common import *
|
|||||||
from .universal import *
|
from .universal import *
|
||||||
from .dailymotion import dailymotion_download
|
from .dailymotion import dailymotion_download
|
||||||
from .vimeo import vimeo_download
|
from .vimeo import vimeo_download
|
||||||
|
from .vine import vine_download
|
||||||
|
|
||||||
def tumblr_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
|
def tumblr_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
|
||||||
if re.match(r'https?://\d+\.media\.tumblr\.com/', url):
|
if re.match(r'https?://\d+\.media\.tumblr\.com/', url):
|
||||||
@ -75,6 +76,9 @@ def tumblr_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
|
|||||||
elif re.search(r'dailymotion\.com', iframe_url):
|
elif re.search(r'dailymotion\.com', iframe_url):
|
||||||
dailymotion_download(iframe_url, output_dir, merge=merge, info_only=info_only, **kwargs)
|
dailymotion_download(iframe_url, output_dir, merge=merge, info_only=info_only, **kwargs)
|
||||||
return
|
return
|
||||||
|
elif re.search(r'vine\.co', iframe_url):
|
||||||
|
vine_download(iframe_url, output_dir, merge=merge, info_only=info_only, **kwargs)
|
||||||
|
return
|
||||||
else:
|
else:
|
||||||
iframe_html = get_content(iframe_url)
|
iframe_html = get_content(iframe_url)
|
||||||
real_url = r1(r'<source src="([^"]*)"', iframe_html)
|
real_url = r1(r'<source src="([^"]*)"', iframe_html)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user