Skip to content

Instantly share code, notes, and snippets.

@sarahstreza
Created October 29, 2011 18:55
Show Gist options
  • Select an option

  • Save sarahstreza/1324927 to your computer and use it in GitHub Desktop.

Select an option

Save sarahstreza/1324927 to your computer and use it in GitHub Desktop.
#! /bin/bash
perl -MLWP -MURI::Escape -e '$u=\&uri_unescape;for(@ARGV){($y,$_)=m[(.+m)/.+[=/]([\w-]{11})] or next;&$u(($l=new LWP::UserAgent)->get("$y/get_video_info?&video_id=$_")->content)=~/ap=url=([^&]+).+&title=([^&]+)/;$l->mirror(&$u($1),do{$t=&$u($2);$t=~y#+/# #;"$_.mp4"})}' $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment