|resources:||Home Mailing List Installation and Usage CVS Bugs Notes|
Please note that leech does not appear to work correctly in Mozilla 1.0 or Netscape 7.0 PR1, at least on the Windows platform. Mozilla 1.1 is recommended.
Click the link above to install automatically, or right-click here to download the XPI manually.
You have to manually uninstall leech:
- Exit Mozilla, and close QuickLaunch if you use it
- Open your Mozilla/Chrome directory
- Delete the leech directory
- Delete the chrome.rdf file and the overlayinfo directory - these will be rebuilt when you restart Mozilla
As leech is now intended to work
with wget, you should first install wget. Most popular
Linux distributions will have binary packages (I myself have tested with
Debian). Windows users can download a binary as part of UnxUtils or the latest version
from Heiko Herold, and
OSX users can get it from macosx.forked.net
or build it themselves via fink.
Onto leech itself, and the first thing you will want to to do is configure leech. Open your preferences panel, and you will find leech under the Advanced section:
Unless you wish all downloads to go to the default "c:\downloads\" directory, enter the location you wish for downloaded files.
Next, edit the filetypes you wish to leech by adding or removing file extensions, separating each extension with a comma. Don't include spaces or the leading period.
If you wish to have the download manager window come to the front to confirm
your file downloads, check the box. A download manager window will not be opened if it isn't already, no
matter whether this box is enabled or disabled.
You also have a choice when it comes to what action is taken when a local file with the same name exists, as long as you are not using the wget method of downloading:
- Overwrite - the existing file will always be overwritten
- Prompt to overwrite - you will be asked if you wish to overwrite the file
- Ignore - the existing file will be saved and the new file will not be downloaded
- Always rename - a numeric prefix will be added to the new local filename automatically, e.g. holidaypic.jpg would become 2_holidaypic.jpg
If you are using wget for downloading, any duplicate files will automatically
be renamed according to wget's built-in rules.
Now you must set the wget configuration. Enter the full path to
the wget executable in the space provided, as well as a location to store
a temporary file (does anybody know if there is an API call to get the system
temporary directory? Let me know!).
Currently there are three actual options for use with wget:
wget can automatically create subdirectories under your download directory when it saves files that fully match the site you are downloading from - choose whether or not to disable this option.
Ordinarily, wget will send its own user-agent string when accessing HTTP URLs, but some sites block what it thinks are spiders or web-bots. For this reason, you can set wget to use whatever your Mozilla user-agent string is.
Finally, you can change the behavior of the "Leech With Prefix" command - if enabled, the command will download the files with wget into a subdirectory that you provide (the prefix). If disabled, the native Mozilla download manager will be used, and the prefix will be applied to the filenames themselves.
Once you have your preferences set, you can begin using leech - just right-click anywhere on the page and select the download mode you want:
"Basic" is the default mode. Every file linked from the page that matches the file extension mask will be downloaded, simple. This works for most pages.
However, there are some sites that have referer protection on linked files
so that they cannot be downloaded this way. In a thumbnail gallery, for example,
you might be able to click on the thumbnails and display the full-size images
fine, but trying to leech them only results in you downloading a 1k file,
or an HTML page, or anything other than the image you want.
For these situations, you can use "Leech Separately". In this mode,
for each linked file a new browser tab will open and you will be asked to
save manually. When you're done, you can close the other tabs by right-clicking
your original page tab and selecting "Close other tabs". This is far
from an ideal solution, but it should work in most instances if you are unable
to download the files automatically, and still saves you a bit of effort
over having to right-click each image, Save Link Location As, etc.
leech 1.5 added a new method of
downloading however, by calling another program, wget, to handle the actual
downloads. wget has no problem at all with referer protection, as leech will force it to send the current
page as the referer - so to the server it looks just like any other web browser
accessing the files. Once you have wget configured, "With wget" is
quite possibly the only mode you'll need to use again - I'm only keeping
"Basic" and "Separately" around for those people who can't or won't get wget
"With Prefix" prompts you for some text that will be preprended to every
local filename, or will be used to create subdirectories if you're downloading
with wget (see preferences).
"Entire site from here" is different. Instead of just downloading
files linked from the page, it will download each web page, any associated
images, etc. It uses wget for this. It's important to note that
this mode follows every link it finds, recursively, so it could result in
a large download!