Skip Menu |

This queue is for tickets about the WWW-Myspace CPAN distribution.

Report information
The Basics
Id: 41074
Status: resolved
Priority: 0/
Queue: WWW-Myspace

People
Owner: steven [...] pyro.eu.org
Requestors: david [...] nabbr.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: 0.91



Subject: _get_friend_requests broken due to MySpace change towards Friend Requests Incoming V2
The _get_friend_requests internal method is currently broken since MySpace has changed its Friend Requests page towards something called V2. Since no @guids are returned from that subroutine, the approve_friend_requests method doesn't loop on line 5078, which produces no effects or actual friend requests approved. I'm not entirely sure if this actually breaks some other stuff but this happens to make the approve_friends script shipped with the distribution exit with no approvals being done. I'm attaching the patch that fixes this issue.
Subject: _get_friend_requests.patch
diff -u -r WWW-Myspace-0.90/lib/WWW/Myspace.pm WWW-Myspace-0.90.nabbr/lib/WWW/Myspace.pm --- WWW-Myspace-0.90/lib/WWW/Myspace.pm 2008-11-15 17:34:18.000000000 -0500 +++ WWW-Myspace-0.90.nabbr/lib/WWW/Myspace.pm 2008-11-19 17:19:31.000000000 -0500 @@ -5123,7 +5123,7 @@ my $line = ""; # Get the GUID codes from it. - while ( $page =~ s/ctl00\$ctl00\$Main\$Main\$incomingRequests\$requestRepeater\$ctl00\$selectRequest.*? value="(.*?)"//im ) { + while ( $page =~ s/(ctl00\$ctl00\$ctl00\$cpMain\$cpMain\$messagingMain\$FriendRequestsIncomingV2.+?\$messageCheckBox)//im ) { $guids{"$1"}++; }
Thanks for your patch, it seems to work fine. Some other changes have also been made to the form on the friends requests page, but your patch quite cleverly works around those, so I will leave the rest of the approve_friend_requests function as-is for now. Your patch will be included in 0.91, coming soon. Thanks again, -- Steven Chamberlain steven@pyro.eu.org