Sometimes you would want to download files from rapidshare via the commandline because the webinterface sucks. Did I say sometimes? You *never* want to use the webinterface 🙂
You have to have a premium account to use it.
#!/usr/bin/perl
$user = $ARGV[0];
$pass = $ARGV[1];
$file = $ARGV[2];
`mkdir ~/.cookies; wget --save-cookies ~/.cookies/rapidshare --post-data "login=$user&password=$pass" -O - https://ssl.rapidshare.com/cgi-bin/premiumzone.cgi > /dev/null`;
open(F, $file);
while() {
chomp;
next if /^$/;
print `wget -c --load-cookies ~/.cookies/rapidshare $_`;
}
Be the first to leave a comment. Don’t be shy.