public
Last active

  • Download Gist
WWW-NicoVideo-Download.patch
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
diff --git a/lib/WWW/NicoVideo/Download.pm b/lib/WWW/NicoVideo/Download.pm
index 269d215..219afd5 100644
--- a/lib/WWW/NicoVideo/Download.pm
+++ b/lib/WWW/NicoVideo/Download.pm
@@ -39,7 +39,7 @@ sub prepare_download {
$self->login($video_id);
}
- $res = $ua->get("http://www.nicovideo.jp/api/getflv?v=$video_id");
+ $res = $ua->get("http://www.nicovideo.jp/api/getflv/$video_id");
if ($res->is_error) {
croak "getflv API error: ", $res->status_line;
}
@@ -56,7 +56,7 @@ sub prepare_download {
sub is_logged_out {
my($self, $res) = @_;
- $res->content =~ /id="login_bar"/;
+ $res->content =~ qr|<strong>ゲスト</strong>|;
}
sub login {

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.