Vimeo: default to download the best quality; fix #58

This commit is contained in:
Mort Yao 2013-01-08 20:41:11 +01:00
parent 1aaf255b93
commit bda672e404

View File

@ -9,11 +9,14 @@ def vimeo_download_by_id(id, title = None, output_dir = '.', merge = True, info_
signature = r1(r'"signature":"([^"]+)"', html) signature = r1(r'"signature":"([^"]+)"', html)
timestamp = r1(r'"timestamp":([^,]+)', html) timestamp = r1(r'"timestamp":([^,]+)', html)
hd = r1(r',"hd":(\d+),', html)
title = r1(r'"title":"([^"]+)"', html) title = r1(r'"title":"([^"]+)"', html)
title = escape_file_path(title) title = escape_file_path(title)
url = 'http://player.vimeo.com/play_redirect?clip_id=%s&sig=%s&time=%s' % (id, signature, timestamp) url = 'http://player.vimeo.com/play_redirect?clip_id=%s&sig=%s&time=%s' % (id, signature, timestamp)
if hd == "1":
url += '&quality=hd'
type, ext, size = url_info(url, faker = True) type, ext, size = url_info(url, faker = True)
print_info(site_info, title, type, size) print_info(site_info, title, type, size)