From bda672e40475c24d4aa2a9ba416dbf0159647aed Mon Sep 17 00:00:00 2001 From: Mort Yao Date: Tue, 8 Jan 2013 20:41:11 +0100 Subject: [PATCH] Vimeo: default to download the best quality; fix #58 --- you_get/downloader/vimeo.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/you_get/downloader/vimeo.py b/you_get/downloader/vimeo.py index d3617ab0..d902805e 100644 --- a/you_get/downloader/vimeo.py +++ b/you_get/downloader/vimeo.py @@ -9,11 +9,14 @@ def vimeo_download_by_id(id, title = None, output_dir = '.', merge = True, info_ signature = r1(r'"signature":"([^"]+)"', html) timestamp = r1(r'"timestamp":([^,]+)', html) + hd = r1(r',"hd":(\d+),', html) title = r1(r'"title":"([^"]+)"', html) title = escape_file_path(title) 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) print_info(site_info, title, type, size)