Skip to content

Instantly share code, notes, and snippets.

@cho45
Created October 4, 2009 17:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cho45/201516 to your computer and use it in GitHub Desktop.
Save cho45/201516 to your computer and use it in GitHub Desktop.
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 {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment