There is a website called the-eye
which hosts a lot of pirated material related to D&D and such.
This script will walk the directory tree there and download all the materials at this link.
You can change the url in the main file to point to other places on the website if you'd like.