git://git.jankratochvil.net
/
youtube-dl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d76736f
)
vimeo: Add the ability to detect if a video is available in HD. (Closes: #194)
author
Rogério Brito
<rbrito@ime.usp.br>
Tue, 18 Oct 2011 21:47:19 +0000
(19:47 -0200)
committer
Philipp Hagemeister
<phihag@phihag.de>
Tue, 18 Oct 2011 22:37:45 +0000
(
00:37
+0200)
youtube-dl
patch
|
blob
|
history
diff --git
a/youtube-dl
b/youtube-dl
index
6770678
..
831ec56
100755
(executable)
--- a/
youtube-dl
+++ b/
youtube-dl
@@
-2059,6
+2059,18
@@
class VimeoIE(InfoExtractor):
return
sig = mobj.group(1).decode('utf-8')
return
sig = mobj.group(1).decode('utf-8')
+ # Vimeo specific: extract video quality information
+ mobj = re.search(r'<isHD>(\d+)</isHD>', webpage)
+ if mobj is None:
+ self._downloader.trouble(u'ERROR: unable to extract video quality information')
+ return
+ quality = mobj.group(1).decode('utf-8')
+
+ if int(quality) == 1:
+ quality = 'hd'
+ else:
+ quality = 'sd'
+
# Vimeo specific: Extract request signature expiration
mobj = re.search(r'<request_signature_expires>(.*?)</request_signature_expires>', webpage)
if mobj is None:
# Vimeo specific: Extract request signature expiration
mobj = re.search(r'<request_signature_expires>(.*?)</request_signature_expires>', webpage)
if mobj is None:
@@
-2066,7
+2078,7
@@
class VimeoIE(InfoExtractor):
return
sig_exp = mobj.group(1).decode('utf-8')
return
sig_exp = mobj.group(1).decode('utf-8')
- video_url = "http://vimeo.com/moogaloop/play/clip:%s/%s/%s
" % (video_id, sig, sig_exp
)
+ video_url = "http://vimeo.com/moogaloop/play/clip:%s/%s/%s
/?q=%s" % (video_id, sig, sig_exp, quality
)
try:
# Process video information
try:
# Process video information