Created
October 4, 2009 17:51
-
-
Save cho45/201516 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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