Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    WWW::Myspace::Comment 0.92

    Download button

    No screenshots available
    Downloads: 352  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Good (3.2/5)
    8 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Grant Grueninger | More programs
    Perl Artistic License / FREE
    February 25th, 2008, 16:13 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    WWW::Myspace::Comment description

    A Perl module used to auto-comment your MySpace friends from Perl scripts.

    WWW::Myspace::Comment is a Perl module used to auto-comment your MySpace friends from Perl scripts.

    SYNOPSIS

    Simple module to leave a comment for each of our friends. This module is an extension of the Myspace module.

    my $myspace = new WWW::Myspace;
    my $comment = WWW::Myspace::Comment->new( $myspace );
    my $result = $comment->post_comments( "Just stopping by to say hi!" );


    Due to MySpace's security features, the post_comments method will, by default, post 50 comments each time it's run. It logs the result of each posting in a file so that it can be re-run daily without duplicating posts. The file defaults to $myspace->cache_dir/commented. It also checks each friend's profile page before posting to make sure we haven't already left a comment there. This also prevents duplicates, but is mostly designed to preserve posts (see note below).

    See the documentation for the post_comments method below for an example script to comment all friends using a loop.

    Also see the comment_myspace script that is installed with the distribution.

    METHODS

    new( $myspace )

    Initialze and return a new WWW::Myspace::Comment object. $myspace is a WWW::Myspace object.

    Example

    use WWW::Myspace; use WWW::Myspace::Comment;
    my $myspace = new WWW::Myspace;
    my $comment = WWW::Myspace::Comment->new( $myspace );

    message

    Retreives/sets the message we're going to leave as a comment.

    friend_ids

    Retreives/sets the list of friendIDs for whom we're going to leave comments.

    $message->friend_ids( 12345, 12347, 123456 ); # Set the list of friends

    @friend_ids = $message->friend_ids; # Retreive the list of friends

    exclusions

    Returns a list of the friends we're not going to comment (because we already have). Returns the list in numerical order from lowest to highest. You probably only need this method for communicating with the user. Note that the post_comments method will also skip people with a link to our profile (i.e. in a comment) on their page. The exclusions list is 1) a safety that stops us from re-posting to pages that need to approve comments, 2) prevents us from having to read hundreds of profiles every time we run.

    Example

    ( @exluded_friends ) = $comment->exclusions;

    commented

    Returns a reference to a hash of friendIDs we've commented and the status of the attempted commenting. Reads the data from the exclusions cache file if it hasn't already been read.

    cache_file

    Sets or returns the cache filename. This defaults to "commented" in the myspace object's cache_dir ($myspace->cache_dir/commented).

    For convenience this method returns the value in all cases, so you can do this:

    $cache_file = $commented->cache_file( "/path/to/file" );

    exclusions_file

    This is a shortcut to "cache_file", which you should use instead. exlucsions_file is here for backwards compatibility.

    max_count

    Sets or returns the number of comments we should post before stopping. Default: 50.

    Call max_count( 0 ) to disable counting. This is good if you can handle CAPTCHA responses and you want to stop only when you get a CAPTCHA request (i.e. if you're running from a CGI script that can pass them back to a user).

    html( [1] [0] )

    Sets to display HTML-friendly output (only really useful with "noisy" turned on also).

    Call html(1) to display HTML tags (currently just "BR" tags). Call html(0) to display plain text.

    Text output (html = 0) is enabled by default.

    Example

    $comment->html( 1 );

    delay_time

    Sets the number of seconds for which the post_all method will sleep after reaching a COUNTER or CAPTCHA response. Defaults to 86400 (24 hours).

    noisy( [1] [0] )

    Retreives/Sets "noisy" output. That is, print status messages for each post. If "html(1)" is called first, BR tags will be placed after each line so you can display it as, say, the output of a CGI script.

    If "noisy" is off, the post_comments method will run silently until it hits a CAPTCHA response or until it hits its max_count.

    set_noisy is off (0) by default.

    set_noisy

    Shortcut for noisy, which you should use instead. set_noisy is here for backwards compatibility.

    interactive

    If set to 1, and running on MacOS X, will pop up a CAPTCHA image in Preview and prompt the user to enter it. (not yet implemented).

    myspace

    Sets/retreives the myspace object with which we're logged in. You probably don't need to use this as you'll pass it to the new method instead.

    post_comments( [ $message ], [ @friend_ids ] )

    Posts comments to friends specified by @friend_ids. If none are given, post_comments retrieves the list of all friends using the WWW::Myspace object's get_friends method.

    post_comments will automatically skip all friendIDs in the "exclusions" list (see the exclusions method above). It will also scan each profile page before posting, and if a link to our profile exists on the page, it will not post. It will post until it has posted "max_count" successful posts, or until it receives a CAPTCHA request ("please enter the characters in the image above").

    post_comments returns a status string indicating why it stopped: CAPTCHA if a CAPTCHA image code was requested. COUNTER if it posted max_count comments and stopped. DONE if it posted everywhere it could.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    MySpace friends | Myspace auto-comment | Perl module | Myspace | comment | Perl

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM