$self->debug('Logging in');
$r = $ua->get('https://www.google.com/accounts/ServiceLoginAuth?service=youtube');
+ unless($r->is_success()) {
+ $self->debug("Could not get login page (make sure your LWP supports HTTPS!)");
+ return undef;
+ }
$c = $r->decoded_content();
$p = HTML::TokeParser->new(\$c);
while (my $tag = $p->get_tag('input')) {
+ $self->debug("%s", Dumper($tag));
if ($tag->[1]{name} eq 'GALX') {
$token = $tag->[1]{value};
last;
}
}
- $self->debug("GALX = .$token");
+ $self->debug("GALX = %s", $token);
$r = $ua->post('https://www.google.com/accounts/ServiceLoginAuth?service=youtube', { 'service' => 'youtube', 'Email' => $user, 'Passwd' => $pass, 'GALX' => $token });
+ unless($r->is_success()) {
+ $self->debug("Could not get login page (make sure your LWP supports HTTPS!)");
+ return undef;
+ }
$c = $r -> decoded_content();
$p = HTML::TokeParser->new(\$c);
while (my $tag = $p->get_tag('script')) {