r18624 - in /trunk/libwww-myspace-perl: Changes META.yml debian/changelog lib/WWW/Myspace.pm t/05-message.t
gregoa-guest at users.alioth.debian.org
gregoa-guest at users.alioth.debian.org
Tue Apr 15 15:57:21 UTC 2008
Author: gregoa-guest
Date: Tue Apr 15 15:57:20 2008
New Revision: 18624
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=18624
Log:
New upstream release.
Modified:
trunk/libwww-myspace-perl/Changes
trunk/libwww-myspace-perl/META.yml
trunk/libwww-myspace-perl/debian/changelog
trunk/libwww-myspace-perl/lib/WWW/Myspace.pm
trunk/libwww-myspace-perl/t/05-message.t
Modified: trunk/libwww-myspace-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-myspace-perl/Changes?rev=18624&op=diff
==============================================================================
--- trunk/libwww-myspace-perl/Changes (original)
+++ trunk/libwww-myspace-perl/Changes Tue Apr 15 15:57:20 2008
@@ -1,6 +1,11 @@
Revision history for WWW::Myspace
-0.77 2008-04-11
+0.78 2008-04-14
+ - Applied patch from RT#34921 by steven [...] pyro.eu.org,
+ fixes post_comment and send_message methods to work with current
+ myspace forms.
+
+0.77 2008-04-11
- MAINTENANCE RELEASE NOTE:
Several methods are still not working due
to changes in myspace forms. As such, the tests will probably fail.
Modified: trunk/libwww-myspace-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-myspace-perl/META.yml?rev=18624&op=diff
==============================================================================
--- trunk/libwww-myspace-perl/META.yml (original)
+++ trunk/libwww-myspace-perl/META.yml Tue Apr 15 15:57:20 2008
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: WWW-Myspace
-version: 0.77
+version: 0.78
version_from: lib/WWW/Myspace.pm
installdirs: site
requires:
Modified: trunk/libwww-myspace-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-myspace-perl/debian/changelog?rev=18624&op=diff
==============================================================================
--- trunk/libwww-myspace-perl/debian/changelog (original)
+++ trunk/libwww-myspace-perl/debian/changelog Tue Apr 15 15:57:20 2008
@@ -1,3 +1,9 @@
+libwww-myspace-perl (0.78-1) UNRELEASED; urgency=low
+
+ * New upstream release.
+
+ -- gregor herrmann <gregor+debian at comodo.priv.at> Tue, 15 Apr 2008 17:56:23 +0200
+
libwww-myspace-perl (0.77-1) unstable; urgency=low
* New upstream release.
Modified: trunk/libwww-myspace-perl/lib/WWW/Myspace.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-myspace-perl/lib/WWW/Myspace.pm?rev=18624&op=diff
==============================================================================
--- trunk/libwww-myspace-perl/lib/WWW/Myspace.pm (original)
+++ trunk/libwww-myspace-perl/lib/WWW/Myspace.pm Tue Apr 15 15:57:20 2008
@@ -1,7 +1,7 @@
######################################################################
# WWW::Myspace.pm
# Sccsid: %Z% %M% %I% Delta: %G%
-# $Id: Myspace.pm 570 2008-04-11 22:44:35Z grantg $
+# $Id: Myspace.pm 571 2008-04-14 23:00:03Z grantg $
######################################################################
# Copyright (c) 2005 Grant Grueninger, Commercial Systems Corp.
#
@@ -42,11 +42,11 @@
=head1 VERSION
-Version 0.77
-
-=cut
-
-our $VERSION = '0.77';
+Version 0.78
+
+=cut
+
+our $VERSION = '0.78';
=head1 WARNING
@@ -118,8 +118,8 @@
# What should we look for to see if we are being asked for a CAPTCHA code?
# We'll extract the URL to return from the area in parenthesis.
-our $CAPTCHA='<img.*?src="(http:\/\/security.myspace.com\/CAPTCHA\/'.
- 'CAPTCHA\.aspx\?SecurityToken=[^"]+)"';
+our $CAPTCHA='<img.*?src="(http:\/\/security\.myspace\.com\/captcha\/'.
+ 'captcha\.aspx\?SecurityToken=[^"]+)"';
our $CAPTCHAi = qr/$CAPTCHA/io; # ok, we will store both ways
our $CAPTCHAs = qr/$CAPTCHA/o;
#$CAPTCHA = $CAPTCHAi; # use case insensitive for now
@@ -203,8 +203,8 @@
comment_posted => qr/Your Comment has been posted/io,
not_logged_in => qr/You Must Be Logged-In to do That\!/io,
verify_message_sent => qr/Your Message Has Been Sent\!/o,
- comment_p1 => qr/ctl00\$(cp)?Main\$postComment\$commentTextBox.*<\/form|$NOT_FRIEND_ERROR|($CAPTCHA)|($INVALID_ID)/smio,
- comment_p2 => qr/ctl00\$(cp)?Main\$postComment\$Button1.*<\/form/smo,
+ comment_p1 => qr/ctl00\$(cp)?Main\$UserWriteCommentsControl\$commentTextBox.*<\/form|($NOT_FRIEND_ERROR)|($CAPTCHA)|($INVALID_ID)/smio,
+ comment_p2 => qr/ctl00\$(cp)?Main\$UserWriteCommentsControl\$ConfirmPostButton.*<\/form/smo,
comment_approval_msg => qr/This user requires all comments to be approved before being posted/o,
not_friend => qr/$NOT_FRIEND_ERROR/smo,
bulletin_url => qr/fuseaction=bulletin\.edit/io,
@@ -3445,7 +3445,7 @@
# Submit the comment to $friend_id's page
$link = $self->mech->find_link(
- text_regex => qr/^add\s+comment$/io );
+ text_regex => qr/^Add\s+Comment$/io );
unless ( $link ) { $status="FL"; last TESTBLOCK; }
( $DEBUG ) && print "Getting comment form..\n";
@@ -3455,8 +3455,9 @@
follow => 1,
form_name => 'aspnetForm',
fields_ref => {
- 'ctl00$cpMain$postComment$commentTextBox' => "$message",
- '__EVENTTARGET' => 'ctl00$cpMain$postComment$postcommentImageButton',
+ 'ctl00$cpMain$UserWriteCommentsControl$commentTextBox' => "$message",
+ 'ctl00$cpMain$UserWriteCommentsControl$postcommentImageButton' => "Post A Comment",
+ # '__EVENTTARGET' => 'ctl00$cpMain$UserWriteCommentsControl$postcommentImageButton',
# '__EVENTARGUMENT' => '',
},
re1 => 'comment_p1',
@@ -3484,7 +3485,7 @@
$submitted = $self->submit_form( {
follow => 1,
form_name => 'aspnetForm',
- button => 'ctl00$cpMain$postComment$ConfirmPostButton',
+ button => 'ctl00$cpMain$UserWriteCommentsControl$ConfirmPostButton',
@captcha
} );
} else {
@@ -3503,7 +3504,7 @@
$page =~ s/[ \t\n\r]+/ /g;
# Set the status code to return.
- if ( $self->_apply_regex( source => $page, regex => 'not_friend_error' ) ) {
+ if ( $self->_apply_regex( source => $page, regex => 'not_friend' ) ) {
$status="FF";
} elsif ( $self->_apply_regex( source => $page, regex => 'is_invalid' ) ) {
$status="FI";
@@ -3977,7 +3978,7 @@
$message{'date'} = $1;
# Subject:
- if ( $page =~ /<th.*?>\s*Subject:\s*<.*?<td>\s*(.*?)\s*<\/td>/smo ) {
+ if ( $page =~ /<p.*?>\s*Subject:\s*<.*?<p.*?>\s*(.*?)\s*<\/p>/smo ) {
$message{'subject'} = $1;
}
@@ -3995,18 +3996,18 @@
# Clean up newlines
$message{'body'} =~ s/[\n\r]/\n/go;
+ # And they have these BR tags at the beginning of each line...
+ # Not any more - 8/16/07
+# $message{'body'} =~ s/^[ \t]*<br \/>[ \t]*//mog;
+
+ # And sometimes they put them elsewhere, so we'll convert those to newlines.
+ # (Note: Maybe this shouldn't be done, since the messages *are* HTML after all)
+ $message{'body'} =~ s/<br (style=\"display:none\")?\/>/\n/mog;
+
# Gotta clean white space before and after the body
$message{'body'} =~ s/^\s*//so; # Before
$message{'body'} =~ s/\s*$//so; # After
- # And they have these BR tags at the beginning of each line...
- # Not any more - 8/16/07
-# $message{'body'} =~ s/^[ \t]*<br \/>[ \t]*//mog;
-
- # And sometimes they put them elsewhere, so we'll convert those to newlines.
- # (Note: Maybe this shouldn't be done, since the messages *are* HTML after all)
- $message{'body'} =~ s/<br \/>/\n/mog;
-
return \%message;
}
@@ -4317,13 +4318,14 @@
# New mail form...
$submitted = $self->submit_form( {
form_name => 'aspnetForm',
+ button => 'ctl00$ctl00$Main$messagingMain$SendMessage$btnSend',
fields_ref => {
- 'ctl00$ctl00$Main$Main$sendMessageControl$subjectTextBox' =>
+ 'ctl00$ctl00$Main$messagingMain$SendMessage$subjectTextBox' =>
"$options{'subject'}",
- 'ctl00$ctl00$Main$Main$sendMessageControl$bodyTextBox' =>
+ 'ctl00$ctl00$Main$messagingMain$SendMessage$bodyTextBox' =>
"$options{'message'}",
- '__EVENTTARGET' => 'ctl00$ctl00$Main$Main$sendMessageControl$btnSend',
- '__EVENTARGUMENT' => ''
+ '__EVENTTARGET' => 'ctl00$ctl00$Main$messagingMain$SendMessage$btnSend',
+ '__EVENTARGUMENT' => ''
},
no_click => 1,
Modified: trunk/libwww-myspace-perl/t/05-message.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-myspace-perl/t/05-message.t?rev=18624&op=diff
==============================================================================
--- trunk/libwww-myspace-perl/t/05-message.t (original)
+++ trunk/libwww-myspace-perl/t/05-message.t Tue Apr 15 15:57:20 2008
@@ -84,7 +84,7 @@
is( $mr->{from}, $CONFIG->{acct1}->{friend_id}, "read_message From" );
is( $mr->{subject}, 'Hi '.$ident, "read_message Subject" );
#is( $mr->{date}, 'Feb 28, 2006 1:20 AM', "read_message Date" );
- is( $mr->{body}, "Just saying hi.\n\nHope all is well.\n", "read_message Body" );
+ is( $mr->{body}, "Just saying hi.\n\nHope all is well.", "read_message Body" );
SKIP: {
skip "delete_message tests disabled because Myspace's Delete button doesn't work", 2;
@@ -182,4 +182,4 @@
# Clean up
unlink 'msave.yml';
-}
+}
More information about the Pkg-perl-cvs-commits
mailing list