Permalink
Browse files

Support so* videos

  • Loading branch information...
1 parent edc4f1f commit 641c68a5c43c0842847bc547b9f7900826998d19 @miyagawa committed Mar 26, 2010
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/WWW/NicoVideo/Download.pm
@@ -41,6 +41,12 @@ sub prepare_download {
$self->login($video_id);
}
+ if ($video_id =~ m/so\d+/){
+ my $u = $res->request->uri->as_string;
+ $u =~ m|.+/([^?]+)|;
+ $video_id = $1;
+ }
+
my $time = scalar time;
$res = $ua->get("http://flapi.nicovideo.jp/api/getflv?v=$video_id&ts=$time&as3=1");
if ($res->is_error) {

0 comments on commit 641c68a

Please sign in to comment.