The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Win32::IEAutomation::RapidShare - Perl extension for downloading files hosted by RapidShare

SYNOPSIS

  use Win32::IEAutomation::RapidShare;

  my $ie = Win32::IEAutomation::RapidShare->new(
        taskName     => 'box180FPS',
        debug        => 1,
        links        => \@rsURL,
        loopServer   => 'yes',
        stopIfBroken => 'yes'
        startTime    => '17:02',
        stopTime     => '09:00'
  );

  my $url = 'http://rapidshare.com/users/ISWUF5';

  $num = $ie->add_rslinks( url => $url );

  $num = $ie->add_rslinks( array => \@uuu );

  $num = $ie->add_rslinks( file => "rsList.txt");

  $num = $ie->check_rslinks();
  
  $ie->downloadrs();

DESCRIPTION

This module uses RapidShare free user account to batch download files. No interactive user action is involved. If waiting between downloads is annoy, please upgrade to premium users. Time works for you.

METHODS

Win32::IEAutomation::RapidShare->new( )

This is the constructor for new Internet Explorer instance through Win32::OLE. Calling this function will create a perl object which internally contains a automation object for internet explorer. In addition to Win32::IEAutomation's options, RapidShare specific options are supported.

  • taskName

    taskName is optional. The URLs list will be saved to a text file. The default name is rapidshare.

  • visible

    It sets the visibility of Internet Explorer window. The default value is 0, means by default it will be invisible if you don't set to 1.

  • debug

    It prints more information in DOS prompt if it is defined. By default the debug mode is off.

  • dltool

    Specify your favorite download utility. The default tool is lwp-download that comes with LWP. You also can specify utility's option.

  • links

    Pass download URLs as an array reference to constructor.

  • loopServer

    There are bunch of alternative download URLs that are point to different server. If this option is defined, different server's URL will be used for each file download. By exam the onscreen download information - download speed and time, users might figure out which server is fast, and then users could use that particular server later.

  • preferServer

    Specify the download server that users like to use for downloading.

  • stopIfBroken

    RapidShare hosted file has max file size limitation (200M?). Lots of big files are zipped and splitted before uploading to RapidShare. So please always validate all links firstly. If any link is broken, it might not a good idea to continue to download files. You could end up with files that cannot be merged and uncompressed.

  • startTime

    Specify time to start downloading files. So users can avoid internet rush hour.

  • stopTime

    Specify time to stop downloading files.

$ie->add_rslinks( )

Import download links from different resource. Duplicated links will be removed from download list. This method returns the number of links.

  • array

    Get from a array reference: $ie->add_rslinks( array => \@uuu )

  • file

    Get from a URL list file: $ie->add_rslinks( file => "rsList.txt")

  • url

    Get from a URL whose page has links: $ie->add_rslinks( url => 'http://rapidshare.com/users/ISWUF5' )

$ie->check_rslinks( )

Validate all links by using RapidShare file checking tool. This method returns the number of broken links. if stopIfBroken is defined and some links broken, the script will exit.

$ie->downloadrs( )

Download all links you jus imported.

Sample Script rs.pl to download a single file

        use Win32::IEAutomation::RapidShare;

        my $ie = Win32::IEAutomation::RapidShare->new(
                links =>[$ARGV[0]],
        );

        $ie->check_rslinks();
        $ie->downloadrs();

SEE ALSO

Win32::IEAutomation.

AUTHOR

Jing Kang <kxj@hotmail.com>