A couple years ago I was downloading a few mame roms from a site called dohgames, I wasn't happy with the the download system in place, it meant too much waiting and clicking just to get a single rom. So I dissembled the site, and wrote a script to download the games much faster.
It's sloppy and could be cleaned up a bit, but it worked and was all I really needed.
As usual I began by deconstruction of the url;
http://www.dohgames.com/roms/download.php?id=148&sys=mame
http://www.dohgames.com
The website the files were hosted on.
/roms/
The Directory where the files were stored.
download.php?
The php script that managed the downloads.
Open in Notepad or another text editor to see how it works, and what files & directories it calls to.
id=148
The id of the Rom I was downloading.
&sys=mame
The System of the Rom I was downloading, in this case Mame.
I then did a few simple tests to findout just how many id's were in the data base.
In this case I found that an id of 1 - 5169 worked.
Example:
http://www.dohgames.com/roms/download.php?id=5169&sys=mame
A quick wget string would fetch the file fine:
wget -nd -p -np -t2 -k -a default.log -nv -A.zip,.exe,.rar,*mame* "http://www.dohgames.com/roms/download.php?id=5169&sys=mame"
Now to download them all just use a variable in place of the url and have a list of all urls you want to download contained within a text file.
dohgames.com has sadly closed it doors after 6 years of service, but the same method used in this post can be applied to other sites.
I've used it successfully on a few sites, though some more complex then others due to security measures in place.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment