To many managers, getting rid of the arrogant, undisciplined, over-paid, technology-obsessed, improperly-dressed programmers would appear to be a significant added benefit.
I found the youtube login was changed so you might need to update the login sub as follows:
sub login { my $resp = $ua->get($login_url); unless ($resp->is_success) { die "Failed getting $login_url: ", $resp->status_line; } my $session_token = extract_session_token($resp->content); print "Session Token: $session_token\n"; unless (defined $session_token) { die "Failed extracting session token, YouTube might have redesigned!"; } # submit the login form my $res = $ua->post($login_url, { current_form => 'loginForm', next => '/', username => $opts{l}, password => $opts{p}, action_login => 'Log In', session_token => $session_token } ); unless ($res->is_success) { die "Failed logging in: failed submitting login form: ", $res->status_line; } # We have no good way to check if we really logged in. # I found that when you have logged in the upper right menu changes # and you have access to 'Log Out' option. # We check for this string to see if we have logged in. unless ($res->content =~ /Sign Out/) { die "Failed logging in: username/password incorrect"; }}
I am being sponsored by Syntress! They bought me an amazing dedicated server to run catonmat on. If you're looking web services, I highly recommend the Syntress guys!
Education Sponsors
I am being sponsored by A-Writer! If you ever need help with essay writing, look no further than A-Writer! They will help you with your writing in as quickly as 3 hours!
I found the youtube login was changed so you might need to update the login sub as follows:
sub login { my $resp = $ua->get($login_url); unless ($resp->is_success) { die "Failed getting $login_url: ", $resp->status_line; } my $session_token = extract_session_token($resp->content); print "Session Token: $session_token\n"; unless (defined $session_token) { die "Failed extracting session token, YouTube might have redesigned!"; } # submit the login form my $res = $ua->post($login_url, { current_form => 'loginForm', next => '/', username => $opts{l}, password => $opts{p}, action_login => 'Log In', session_token => $session_token } ); unless ($res->is_success) { die "Failed logging in: failed submitting login form: ", $res->status_line; } # We have no good way to check if we really logged in. # I found that when you have logged in the upper right menu changes # and you have access to 'Log Out' option. # We check for this string to see if we have logged in. unless ($res->content =~ /Sign Out/) { die "Failed logging in: username/password incorrect"; }}Reply To This Comment