r4072 - in /packages/libwww-myspace-perl/trunk: ._Changes Changes META.yml debian/changelog debian/control lib/WWW/Myspace.pm lib/WWW/Myspace/Comment.pm lib/WWW/Myspace/Message.pm sample_scripts/._last_login sample_scripts/post_comment

eloy at users.alioth.debian.org eloy at users.alioth.debian.org
Fri Oct 6 21:22:57 UTC 2006


Author: eloy
Date: Fri Oct  6 21:22:56 2006
New Revision: 4072

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=4072
Log:
eloy: new upstream version

Removed:
    packages/libwww-myspace-perl/trunk/._Changes
    packages/libwww-myspace-perl/trunk/sample_scripts/._last_login
Modified:
    packages/libwww-myspace-perl/trunk/Changes
    packages/libwww-myspace-perl/trunk/META.yml
    packages/libwww-myspace-perl/trunk/debian/changelog
    packages/libwww-myspace-perl/trunk/debian/control
    packages/libwww-myspace-perl/trunk/lib/WWW/Myspace.pm
    packages/libwww-myspace-perl/trunk/lib/WWW/Myspace/Comment.pm
    packages/libwww-myspace-perl/trunk/lib/WWW/Myspace/Message.pm
    packages/libwww-myspace-perl/trunk/sample_scripts/post_comment

Modified: packages/libwww-myspace-perl/trunk/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libwww-myspace-perl/trunk/Changes?rev=4072&op=diff
==============================================================================
--- packages/libwww-myspace-perl/trunk/Changes (original)
+++ packages/libwww-myspace-perl/trunk/Changes Fri Oct  6 21:22:56 2006
@@ -1,4 +1,22 @@
 Revision history for WWW::Myspace
+
+0.58    2006-09-17
+        - Added post_bulletin method and 12-bulletin.t test (don't worry,
+          doesn't confirm the bulletin when testing).
+
+0.57    2006-09-16
+        - Added FL status code to send_message (can't find Send Message
+          link on profile page).
+        - Fixed condition in send_message that would cause "FN" to be
+          returned instead of "FF" (private profile, must be friend to
+          send message).
+        - Updated "post_comment" for new form field names.
+        - Updated RE in friend_user_name to use "nametext" span tag instead
+          of comment link (name attribute was removed from there).
+        - Added WARNING to Myspace.pm, Comment.pm, and Message.pm
+          regarding account crippling.  WARNING: DO NOT USE THIS
+          MODULE FOR MASS MESSAGING OR MASS COMMENTING.  YOUR
+          ACCOUNT WILL BE CRIPPLED OR DISABLED.  See docs for details.
 
 0.56	2006-09-09
 		- Added "FL" response code to post_comment. Returns FL if it

Modified: packages/libwww-myspace-perl/trunk/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libwww-myspace-perl/trunk/META.yml?rev=4072&op=diff
==============================================================================
--- packages/libwww-myspace-perl/trunk/META.yml (original)
+++ packages/libwww-myspace-perl/trunk/META.yml Fri Oct  6 21:22:56 2006
@@ -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.56
+version:      0.58
 version_from: lib/WWW/Myspace.pm
 installdirs:  site
 requires:

Modified: packages/libwww-myspace-perl/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libwww-myspace-perl/trunk/debian/changelog?rev=4072&op=diff
==============================================================================
--- packages/libwww-myspace-perl/trunk/debian/changelog (original)
+++ packages/libwww-myspace-perl/trunk/debian/changelog Fri Oct  6 21:22:56 2006
@@ -1,3 +1,10 @@
+libwww-myspace-perl (0.58-1) unstable; urgency=low
+
+  * New upstream release
+  * debian/control: added me to Uploaders
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org>  Fri,  6 Oct 2006 23:21:20 +0200
+
 libwww-myspace-perl (0.56-1) unstable; urgency=low
 
   * New upstream release.
@@ -26,4 +33,3 @@
   * Initial Release.
 
  -- David Moreno Garza <damog at debian.org>  Tue,  6 Jun 2006 12:04:03 -0500
-

Modified: packages/libwww-myspace-perl/trunk/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libwww-myspace-perl/trunk/debian/control?rev=4072&op=diff
==============================================================================
--- packages/libwww-myspace-perl/trunk/debian/control (original)
+++ packages/libwww-myspace-perl/trunk/debian/control Fri Oct  6 21:22:56 2006
@@ -4,7 +4,7 @@
 Build-Depends: debhelper (>= 4.0.2)
 Build-Depends-Indep: perl (>= 5.8.0-7), libspiffy-perl, libparams-validate-perl, libconfig-general-perl, libyaml-perl, libcontextual-return-perl, libversion-perl, libwant-perl, liblocale-subcountry-perl, libwww-mechanize-perl, libio-prompt-perl, libterm-readkey-perl, liblist-compare-perl, libmath-round-perl, libclass-dbi-loader-perl, libclass-dbi-abstractsearch-perl, libdatetime-perl, netbase, libdatetime-format-mysql-perl, libdatetime-format-builder-perl, libtest-pod-perl, libtest-pod-coverage-perl
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Uploaders: gregor herrmann <gregor+debian at comodo.priv.at>
+Uploaders: gregor herrmann <gregor+debian at comodo.priv.at>, Krzysztof Krzyzaniak (eloy) <eloy at debian.org>
 Standards-Version: 3.7.2
 XS-Vcs-Svn: svn://svn.debian.org/svn/pkg-perl/packages/libwww-myspace-perl/trunk/
 

Modified: packages/libwww-myspace-perl/trunk/lib/WWW/Myspace.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libwww-myspace-perl/trunk/lib/WWW/Myspace.pm?rev=4072&op=diff
==============================================================================
--- packages/libwww-myspace-perl/trunk/lib/WWW/Myspace.pm (original)
+++ packages/libwww-myspace-perl/trunk/lib/WWW/Myspace.pm Fri Oct  6 21:22:56 2006
@@ -1,7 +1,7 @@
 ######################################################################
 # WWW::Myspace.pm
 # Sccsid:  %Z%  %M%  %I%  Delta: %G%
-# $Id: Myspace.pm 256 2006-09-10 06:52:42Z grantg $
+# $Id: Myspace.pm 266 2006-09-18 04:43:53Z grantg $
 ######################################################################
 # Copyright (c) 2005 Grant Grueninger, Commercial Systems Corp.
 #
@@ -35,11 +35,33 @@
 
 =head1 VERSION
 
-Version 0.56
-
-=cut
-
-our $VERSION = '0.56';
+Version 0.58
+
+=cut
+
+our $VERSION = '0.58';
+
+=head1 WARNING
+
+WARNING - DO NOT USE THIS MODULE FOR MASS MESSAGING OR COMMENTING.
+
+Myspace will cripple or disable your account:
+
+Older accounts:
+
+Messages will appear in your Sent folder but not in the receiver's
+inbox, although they'll be able to see it if they're paging through from
+another message.
+The receiver will get a "New Comments" notification and be able to see
+your comment, but it won't appear on the profile page.
+
+Newer accounts:
+
+If you created your myspace account in or after June 2006 (approximately),
+and you use a "bot" (including this module) to send messages, your message
+sending ability will be disabled and your account may be deleted. This
+is due to security features myspace has implemented to prevent spam
+abuse by people using multiple accounts.
 
 =head1 SYNOPSIS
 
@@ -900,10 +922,10 @@
         $page = $self->current_page;
     }
 
-    if ( $page->content =~ /index\.cfm\?fuseaction=user\&circuitaction\=viewProfile_commentForm\&friendID\=[0-9]+\&name\=([^\&]+)\&/ ) {
+    if ( $page->content =~ /<span class="nametext">(.*?)<\/span>/ ) {
         my $line = $1;
-        $line =~ s/\+/ /g;
-        $line =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
+#        $line =~ s/\+/ /g;
+#        $line =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
         return $line;
     } else {
         return "";
@@ -2284,10 +2306,11 @@
         $submitted = 
             $self->submit_form(
                             $link->url,
-                            1, "", { 'f_comments' => "$message" },
-                            "f_comments.*<\/form|($CAPTCHA)|($NOT_FRIEND_ERROR)|".
+                            1, "", { 'ctl00$Main$postComment$commentTextBox' => "$message" },
+                            'ctl00\$Main\$postComment\$commentTextBox'.
+                            ".*<\/form|($CAPTCHA)|($NOT_FRIEND_ERROR)|".
                             "($INVALID_ID)",
-                            'f_comments.*<\/form'
+                            'ctl00\$Main\$postComment\$ConfirmPostButton.*<\/form'
                         );
         
         # If we posted ok, confirm the comment
@@ -2865,6 +2888,7 @@
         FE  =>  'Failed, you have exceeded your daily usage.',
         FC  =>  'Failed, CAPTCHA response requested.',
         FI  =>  'Failed, Invalid FriendID.',
+        FL  =>  'Failed, can\'t find Send Message link on profile page.',
         F   =>  'Failed, verification string not found on page after posting.',
 
     );
@@ -2908,7 +2932,7 @@
         'Mail\s+Center.*Send\s+a\s+Message|'.$MAIL_PRIVATE_ERROR.'|'.
         $MAIL_AWAY_ERROR.'|'.$INVALID_ID );
     } else {
-        $self->error( "Can't find fuseaction=mail.message on profile page" );
+        return "FL"
     }
 
     # Check for network error
@@ -3643,6 +3667,68 @@
     }
 
     return ( \@passed, \@failed );
+
+}
+
+=head2 post_bulletin( %options )
+
+Post a builletin to your friends.
+
+ use WWW::Myspace;
+ 
+ my $myspace = new WWW::Myspace;
+
+ $myspace->post_bulletin(
+     subject => $subject,
+     message => $message
+ );
+
+=cut
+
+sub post_bulletin {
+
+    my %options = @_;
+
+    $self->_die_unless_logged_in( 'post_bulletin' );
+
+    # Go home
+    $self->_go_home;
+    return 0 if $self->error;
+#    warn "Got home page" . "\n" if $options{'testing'};
+    
+    # Click "post bulletin"
+    my $link = $self->mech->find_link(
+                            text_regex => qr/^post\s+bulletin$/i );
+
+    unless ( $link ) {
+        $self->error("Post Bulletin link not found on home page");
+        return 0;
+    }
+#    warn "Found Post Bulletin link: ".$link->url . "\n" if $options{'testing'};
+
+    # Fill in and submit the form
+    my $submitted = $self->submit_form( {
+        page => $link->url,
+        form_name => 'bulletinForm',
+        fields_ref => {
+            subject => $options{'subject'},
+            body => $options{'message'},
+        },
+        re1 => 'name="bulletinForm"',
+        re2 => 'Confirm\s+Bulletin',
+    } );
+
+    return 0 unless $submitted;
+
+    # And now confirm it (unless we're testing).
+    unless ( $options{'testing'} ) {
+#        warn "Submitting Confirmation screen";
+        $submitted = $self->submit_form( {
+            form_name => 'bulletinForm'
+        } );
+    }
+
+    return $submitted;
 
 }
 

Modified: packages/libwww-myspace-perl/trunk/lib/WWW/Myspace/Comment.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libwww-myspace-perl/trunk/lib/WWW/Myspace/Comment.pm?rev=4072&op=diff
==============================================================================
--- packages/libwww-myspace-perl/trunk/lib/WWW/Myspace/Comment.pm (original)
+++ packages/libwww-myspace-perl/trunk/lib/WWW/Myspace/Comment.pm Fri Oct  6 21:22:56 2006
@@ -1,4 +1,4 @@
-# $Id: Comment.pm 256 2006-09-10 06:52:42Z grantg $
+# $Id: Comment.pm 263 2006-09-16 19:12:52Z grantg $
 
 package WWW::Myspace::Comment;
 
@@ -17,6 +17,28 @@
 =cut
 
 our $VERSION = '0.16';
+
+=head1 WARNING
+
+WARNING - DO NOT USE THIS MODULE FOR MASS MESSAGING OR COMMENTING.
+
+Myspace will cripple or disable your account:
+
+Older accounts:
+
+Messages will appear in your Sent folder but not in the receiver's
+inbox, although they'll be able to see it if they're paging through from
+another message.
+The receiver will get a "New Comments" notification and be able to see
+your comment, but it won't appear on the profile page.
+
+Newer accounts:
+
+If you created your myspace account in or after June 2006 (approximately),
+and you use a "bot" (including this module) to send messages, your message
+sending ability will be disabled and your account may be deleted. This
+is due to security features myspace has implemented to prevent spam
+abuse by people using multiple accounts.
 
 =head1 SYNOPSIS
 

Modified: packages/libwww-myspace-perl/trunk/lib/WWW/Myspace/Message.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libwww-myspace-perl/trunk/lib/WWW/Myspace/Message.pm?rev=4072&op=diff
==============================================================================
--- packages/libwww-myspace-perl/trunk/lib/WWW/Myspace/Message.pm (original)
+++ packages/libwww-myspace-perl/trunk/lib/WWW/Myspace/Message.pm Fri Oct  6 21:22:56 2006
@@ -1,4 +1,4 @@
-# $Id: Message.pm 247 2006-09-06 00:47:12Z grantg $
+# $Id: Message.pm 263 2006-09-16 19:12:52Z grantg $
 
 package WWW::Myspace::Message;
 
@@ -21,15 +21,25 @@
 
 =head1 WARNING
 
+WARNING - DO NOT USE THIS MODULE FOR MASS MESSAGING OR COMMENTING.
+
+Myspace will cripple or disable your account:
+
+Older accounts:
+
+Messages will appear in your Sent folder but not in the receiver's
+inbox, although they'll be able to see it if they're paging through from
+another message.
+The receiver will get a "New Comments" notification and be able to see
+your comment, but it won't appear on the profile page.
+
+Newer accounts:
+
 If you created your myspace account in or after June 2006 (approximately),
 and you use a "bot" (including this module) to send messages, your message
 sending ability will be disabled and your account may be deleted. This
 is due to security features myspace has implemented to prevent spam
-abuse by people using multiple accounts. This does not seem to affect older
-accounts, so if you've had your account since at least early 2006 you
-should be fine.
-
-We don't know yet if this affects commenting or friend adding.
+abuse by people using multiple accounts.
 
 =head1 SYNOPSIS
 

Modified: packages/libwww-myspace-perl/trunk/sample_scripts/post_comment
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libwww-myspace-perl/trunk/sample_scripts/post_comment?rev=4072&op=diff
==============================================================================
--- packages/libwww-myspace-perl/trunk/sample_scripts/post_comment (original)
+++ packages/libwww-myspace-perl/trunk/sample_scripts/post_comment Fri Oct  6 21:22:56 2006
@@ -7,3 +7,5 @@
 my $result = $myspace->post_comment( @ARGV );
 
 print $result."\n";
+
+die $myspace->error."\n" if $myspace->error;




More information about the Pkg-perl-cvs-commits mailing list