mirror of
https://github.com/soimort/you-get.git
synced 2025-03-13 03:17:44 +03:00
Support for tumblr-hosted videos.
This commit is contained in:
parent
d1eb858fcc
commit
5aa7b87dce
@ -67,6 +67,11 @@ def tumblr_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
|
||||
if not real_url:
|
||||
real_url = r1(r'<source src="([^"]*)"', html)
|
||||
if not real_url:
|
||||
iframe_url = r1(r'<[^>]+tumblr_video_container[^>]+><iframe[^>]+src=[\'"]([^\'"]*)[\'"]', html)
|
||||
if len(iframe_url) > 0:
|
||||
iframe_html = get_content(iframe_url, headers=fake_headers)
|
||||
real_url = r1(r'<video[^>]*>[\n ]*<source[^>]+src=[\'"]([^\'"]*)[\'"]', iframe_html)
|
||||
else:
|
||||
iframe_url = r1(r'<iframe[^>]+src=[\'"]([^\'"]*)[\'"]', html)
|
||||
if iframe_url[:2] == '//': iframe_url = 'http:' + iframe_url
|
||||
if re.search(r'player\.vimeo\.com', iframe_url):
|
||||
|
Loading…
x
Reference in New Issue
Block a user