Subject: | New Myspace login form breaks all functionality; patch included |
Date: | Thu, 22 May 2008 15:32:39 +0100 |
To: | bug-www-myspace [...] rt.cpan.org |
From: | Steven Chamberlain <steven [...] pyro.eu.org> |
Hi,
Myspace have again changed their login form slightly. This broke login,
and therefore nothing else would work either. My attached patch appears
to fix this, and the test suite shows no other problems.
Eventually it would be best if WWW::Myspace could guess all of the login
form details, but at the moment I don't mind submitting patches to fix
it whenever it breaks -- it doesn't happen *too* often.
Regards,
--
Steven Chamberlain
steven@pyro.eu.org
Index: Myspace.pm
===================================================================
--- Myspace.pm (revision 579)
+++ Myspace.pm (working copy)
@@ -633,6 +633,22 @@
my $submitted="";
$self->get_page( 'http://www.myspace.com/' );
if ( $self->current_page->decoded_content =~
+ /ctl00\$ctl00\$Main\$cpMain\$SplashDisplay\$ctl01\$Email_Textbox/io )
+ {
+ # 2008-05-22 -- slight change to form input names; this could easily
+ # change back in the future (it has done so previously)
+ $submitted = $self->submit_form( {
+# page => 'http://www.myspace.com/',
+ form_name => 'aspnetForm',
+ fields_ref => { 'ctl00$ctl00$Main$cpMain$SplashDisplay$ctl01$Email_Textbox' => $self->account_name,
+ 'ctl00$ctl00$Main$cpMain$SplashDisplay$ctl01$Password_Textbox' => $self->password,
+ # '__EVENTTARGET' => 'ctl00$ctl00$Main$cpMain$SplashDisplay$ctl01$Login_ImageButton',
+ # '__EVENTARGUMENT' => '',
+ },
+ action => 'http://secure.myspace.com/index.cfm?fuseaction=login.process',
+ # no_click => 1,
+ } ) ;
+ } elsif ( $self->current_page->decoded_content =~
/ctl00\$ctl00\$Main\$cpMain\$SplashDisplay\$ctl00\$Email_Textbox/io )
{
# 2008-04-11 -- they added an extra ctl00$ and cpMain$ to the names of