Subject: | add_to_friends >CAPTCHA Check |
send_friend_request( )
There seems to be no check for page output after sending a friend
request. This hinders the process of putting it in a loop, as the
friend requesting is based on the captcha blocking.
After 50 or so friends in a while loop, not checking the page after
submiting the form leaves the loop thinking that everything is fine.
Took me a while to realise that i was getting a captcha :)
#########################################
#########################################
sub send_friend_request {
# We pass unless
my $pass = 1;
foreach my $id ( @_ ) {
my $res = $self->submit_form(
'http://collect.myspace.com/index.cfm?'.
'fuseaction=invite.addfriend_verify&'.
'friendID=' . $id, 1, '', {} );
unless ( $res ) { $pass = 0 }
}
return ( $pass );
}