Permalink
Browse files

Merge branch 'master' of git://github.com/DrHyde/vimeo-downloader int…

…o DrHyde-master

Conflicts:
	vimeo_downloader.sh
  • Loading branch information...
2 parents 3a2d193 + 80bb412 commit a89d9ff5eabeaf907513f6aa3a3a1e29470f2daa @johnteslade committed Sep 24, 2012
Showing with 5 additions and 7 deletions.
  1. +1 −0 .gitignore
  2. +4 −7 vimeo_downloader.sh
View
@@ -0,0 +1 @@
+.AppleDouble
View
@@ -62,13 +62,10 @@ VIDEO_XML=`${GET_CMD} http://vimeo.com/${VIMEO_ID}`
if [ $USING_PERL -eq 1 ]; then
REQUEST_SIGNATURE=`echo $VIDEO_XML | perl -e '@text_in = <STDIN>; if (join(" ", @text_in) =~ /"signature":"(.*?)"/i ){ print "$1\n"; }'`
REQUEST_SIGNATURE_EXPIRES=`echo $VIDEO_XML | perl -e '@text_in = <STDIN>; if (join(" ", @text_in) =~ /"timestamp":(\d*?),/i ){ print "$1\n"; }'`
- CAPTION=`echo $VIDEO_XML | perl -p -e 's:^.*?\<caption\>(.*?)\</caption\>.*$:$1:g'`
- QUALITY=`echo $VIDEO_XML | perl -p -e 's:^.*?\<meta itemprop="videoQuality" content="(.*?)">.*$:$1:g' | tr '[A-Z]' '[a-z]'`
+ CAPTION=`echo $VIDEO_XML | perl -p -e '/^.*?\<meta property="og:title" content="(.*?)"\>.*$/; $_=$1; s/[^\w.]/-/g;'`
+ ISHD=`echo $VIDEO_XML | perl -p -e '/^.*?\<meta itemprop="videoQuality" content="(HD)"\>.*$/; $_=lc($1)||"sd";'`
- # caption can contain bad characters (like '/') so don't use it for now
- #FILENAME="${CAPTION}-(${ISHD}${VIMEO_ID}).flv"
-
- FILENAME="${VIMEO_ID}-${ISHD}.flv"
+ FILENAME="${CAPTION}-(${ISHD}-${VIMEO_ID}).flv"
else
# TODO update the sed code to work with the new site format
@@ -88,7 +85,7 @@ echo "Request_signature_expires=${REQUEST_SIGNATURE_EXPIRES}"
echo "Quality=${QUALITY}"
echo
-EXEC_CMD="${GET_CMD} http://player.vimeo.com/play_redirect?clip_id=${VIMEO_ID}&sig=${REQUEST_SIGNATURE}&time=${REQUEST_SIGNATURE_EXPIRES}&quality=${QUALITY}&codecs=H264,VP8,VP6&type=moogaloop_local&embed_location="
+EXEC_CMD="${GET_CMD} http://player.vimeo.com/play_redirect?clip_id=${VIMEO_ID}&sig=${REQUEST_SIGNATURE}&time=${REQUEST_SIGNATURE_EXPIRES}&quality=${ISHD}&codecs=H264,VP8,VP6&type=moogaloop_local&embed_location="
echo "Executing ${EXEC_CMD}"
${EXEC_CMD} > "${FILENAME}"

0 comments on commit a89d9ff

Please sign in to comment.