Reply to comment
The Almighty Rapidshare download Script
Over the past several months, I have been working on and off on a perl script designed to read links (rapidshare or otherwise) from a mysql database and download them. It has been through many changes over the last few weeks, as I have been able to begin to improve it to work better and add more features for me.
At the moment, the script does:
* Downloads Rapidshare files (assuming you have a premium Account)
* Downloads normal files
* Creates a directory within a Download directory for the files to be downloaded to (this name is based off the filename of the file being downloaded)
* Creates a log so that you know what is going on
There are also init and sbin scripts that I have created to more easily control the script, namely pausing the process and resuming it. This is done through the -SIGSTOP -SIGCONT using the kill command in linux. I had a number of issues getting this to work, as some of the signals are not compatible with the processes I was sending them too.
The script basically just reads the database for links and the place where you would like to download the file too (within the base download folder). In order to effectively use it to download you need an easy way to enter data into the database. For this I decided that an web based system would be best, so I coded up some basic PHP pages to take links and place them into the database so that they can be downloaded.
As time went on, I continued to improve different aspects of the script and the php pages that accompany it. I added some additional functionality for the PHP page that added the scripts to the database, when it reads that there are RS links, it will use the RS API to check if those links actually exist and are able to be downloaded from RS. If so, they will be added to the database, if not, it will not add any of the links to the database and print a list of links you tried to add with their current status.
I have been working on a way get files (.rar mostly) to be extracted through a PHP but so far I have had luck. But for the moment it works pretty well.
Bellow are a list of features I am thinking about adding:
* Scheduling
* Extraction of .rar files through web site
* additional shell scripts for the extraction of files through console or ssh connection
I am yet to post the script and additional files on here for download as its not quite done and would require a few changes to make it for public use. But if you wish to get a copy of this script, feel free to drop me an email (wrighty@thewrighty.com) and ill see what i can do.