Hack 94: Supercharge Your Firefox Downloads with DownThemAll!

第94招:用DownThemAll为你的Firefox下载加速

Level Advanced

难易程序 难

Platform All (with Firefox)

平台 Firefox

Cost Free

是否免费 是

When it comes to heavy-duty download jobs, your web browser’s default downloads manager just doesn’t cut it. If you need closer control of multiple, large downloads, you need the DownThemAll! Firefox extension (also known as data). This extra-strength download manager can speed up, queue for later, and download sets of files in batches from the Web based on patterns you define in one click.

当你需要大量下载文件时,浏览器自带的下载工具就会显得力不从心。这时,你就需要DownThemAll扩展程序。它能像专用的下载软件一样下载。

In this hack, you learn how to finely control and prioritize downloads with DownThemAll and batch-save all the MP3s from a web page in one shot. Before you start, install DownThemAll for free using Firefox at https://addons.mozilla.org/en-US/firefox/addon/201.

以下将为你讲解如何利用DownThemAll来加速你的下载过程。你可以到https://addons.mozilla.org/en-US/firefox/addon/201.下载这个扩展程序。

NOTE Hack 93, “Extend Your Web Browser” covers how to install a Firefox extension such as DownThemAll. As of this writing, DownThemAll is available only for Firefox.

注意 上文中已经讲过了如何安装Firefox扩展程序,这一部分主要讲具体应用这个扩展程序

Download Individual Files with DownThemAll!

用DownThemAll下载单独的文件

In DownThemAll’s most basic usage, download a particular file from a web page by following these steps:

以下是用DownThemAll下载文件的基本过程:

1. Right-click it and choose Save with DownThemAll from the context menu. Depending on what you select — a video, a link to another web page, an image — this item may read Save Link with DownThemAll as well.

1. 右键点击下载链接,选择使用DownThemAll下载文件。根据文件格式的不同,也有可以是链接另存为。

2. Set the destination directory for where dTa should save the files.

2. 选择文件保存的位置

3. Click the Start button; dTa opens a window that displays all your downloads, their transfer progress, and several buttons that can pause, resume, cancel, and reorder the priority of your downloads, as shown in Figure 10-9.

3. 点击开始按钮,DTA会弹出一个窗口,在这个窗口你可以管理你的下载。停止、重新开始下载、改变下载顺序等等

Figure 10-9: Pause, resume, reorder, and cancel download in progress with DownThemAll.

图10-9:停止、重新开始下载、排序和取消下载

 

One of the greatest benefits of using dTa instead of Firefox’s default  download managers is that dTa can split large files into several pieces and download  each piece individually from the web server. Since many web servers limit the file-transfer bandwidth for each connection, splitting a large download — for example, a bootable Linux CD (see Hack 115, “Recover Files from an Unbootable PC”) — into several parts allows you to download the file more quickly. After downloading all the parts, dTa reassembles the original file and you’ve saved yourself a lot of waiting.

DTA最大的优点就是它可以实现多线程的下载,提高下载的速度。特别是下载大的文件时。

Batch-Download Files with Filters

批量下载

Say you’ve stumbled onto a site full of high-resolution images that would be perfect as desktop wallpapers and you want to download the all.  Instead of tediously right-clicking each one to start the transfer, DownThemAll!  Helps you select a large set of files and start their transfer quickly and easily based on certain criteria. It does that by listing all the media available on a web page (such as images and video clips) and all the files to which that page links.

比方说,你在一个网页里面找到了很多适合当桌面背景的图片,你想全部下载下来。这时,你可以用DTA来简化下载的过程。DTA可以设置过滤下载,比如只下载图片文件或者只下载应用程序等等(其实跟迅雷一样)。

To see these lists, follow these steps:

步骤如下:

1. Right-click any web page in Firefox with dTa installed, and chooses DownThemAll to open the selection dialog.

1. 右键点击网页,选择用DTA全部下载

2. Use the Links tab and Pictures and Media tab at the top to toggle between lists. From a given list, you can manually select the files you want, or automatically select a subset using filters — such as the preset Archives (.zip and .rar files), Video (.mpeg, .avi, .wmv) and Images (.gif, .jpg, .png) filters, as shown in Figure 10-10.

2. 然后在弹出的窗口里面选择你所要下载的文件类型(如图10-10)

3. When you’re satisfied with the file selection, click the Start button to begin downloading.

3. 选好之后就可以开始下载了。

Figure 10-10: Use a preset filter to select files to download in DownThemAll!

图10-10:用过滤下载下载文件

 

Customize a Filter to Download All the MP3s on a Web Page

自定义过滤器下载MP3文件

When you right-click and choose DownThemAll from the context  menu on a web page, dTa presents a list of possible downloads from that page — every  single link that exists there, whether it’s to another web page or a piece of media,  such as an image, video or MP3. The power in dTa is the Filters area, where you define a pattern that selects the files you want to download from the often long and crowded list.

当你右键选择使用DTA下载的时候,会弹出一个窗口,里面包含了所有可以下载的文件类型。你可以用这种过滤的功能轻松的找到你想要下载的内容。

If you’re visiting music site that features MP3 downloads (such as www.delicious.com/tag/system:filetype:mp3), you might just want to suck down all the music from the page in one click. Here’s how to do so:

例如,当你访问一个音乐网站的时候,你可以想下载这个页面上所有的MP3,那么你可以这么做:

1. Define your filter. Open DownThemAll’s Preferences dialog box by right-clicking any web page, choosing DownThemAll from the context menu, and then clicking the Preferences link at the bottom right of the dialog box. In the Preferences area, go to the Filters tab. There you see several predefined file filters, such as Archives (.zip and .rar files) Videos (.mpeg, .avi, .wmv) and Audio (.mp3, .wav, .acc, and so on). The Extensions column contains a regular expression that defines the file filter. To create a new filter that downloads only MP3 files, click the Add New Filter button. Set the caption to *.mp3 and set the Filtered Extensions to /\/[^\/\?]+\.mp3$/, as shown in Figure 10-11. Click the OK button to save your new filter.

1. 定义过滤器。打开一个网页,选择用DTA下载。这时会弹出一个对话框,在对话框里面选择配置按钮。进行配置界面后,选择过滤器选项卡。这时你会看到一些事先设定好的过滤器,选择创建新过滤器按钮来创建一个新的过滤器,只下载MP3文件。在caption栏填入*.mp3然后在过滤规则里填入/\/[^\/\?]+\.mp3$/,如图10-11所示。点击确认保存。

Figure 10-11: Configure a filter to automatically select all the .mp3 files linked on a web page.

图10-11:设置新的过滤器,只下载MP3文件

 

2. Select all the MP3s with your filter. On a page that links to music files, such as www.delicious.com/tag/system:filetype:mp3, right-click and choose DownThemAll. Click the MP3 filter check box to select only the music  files linked on the page for download — just 9 out of 123, as shown in  Figure 10-12. Be sure to select the destination directory on your hard drive as well in the Save Files In: area.

2. 用新建的过滤器下载MP3文件。在你要下载文件的网页里面,右键点选DTA下载。把MP3过滤器勾上。然后DTA就会自动过滤出网页里面的MP3文件,如图10-12.选择你要保存的文件位置,确认就可以开始下载了。

Figure 10-12: Select the  *.mp3 filter that you created to automatically  select only the MP3 files linked on the current web page for download.

图10-12: 选择MP3过滤器下载MP3文件

 

3. Custom-rename files. Another useful dTa feature is the capability to set the downloaded filenames using different variables, such as date and time and order number. In the Renaming Mask drop-down list, choose the pattern the downloaded filenames should use. Click the little paper-clip note button to see the Renaming Tags reference table, as shown in Figure 10-13.

3. 重命名文件。DTA的另外一个功能就是自动为下载的文件命名。在命名界面,选择一种规则为已下载的文件命名。如图10-13.

Figure 10-13: Rename downloaded files using custom renaming tags.

图10-13: 为下载的文件重命名

4. Queue or start your download. Click the Start button to begin downloading the tracks from the Web. Alternatively, if you don’t want to use the bandwidth now, click the Add Paused button (a kind of light download bookmarking tool) to set up the files in dTa for downloading later on.

4. 暂停或者重新开始下载。点击开始就可以开始下载文件。同样,如果你想暂停下载的话,可以点击暂停按钮来停止下载。当你需要重新开始下载的时候,就点击重新开始下载就可以了。

One-Click Access to dTa Settings

一键进入DTA的设置界面

When you have a list of dTa preferences set up that you want to reuse — say, if you want to periodically download MP3s from several of your favorite music blogs — use dTa OneClick, also available on your right-click context menu. From the Help page:

当你需要重新启动一些DTA的设置的时候,例如从一些博客下载MP3文件,你可以用DTA oneclick的功能。DTA oneclick功能介绍如下:

dTa OneClick will start downloading all the  links/pictures of the current webpage that will match the filters used in the  last dTa session. Downloads will be saved in the last set destination path and will be renamed using the last set renaming mask.

DTA oneclick功能就是使用最近使用过的设置来下载当前而的内容。包括过滤器,存储目录等。

As can the command-line program wget, detailed in Hack 66, “Automatically Download Music, Movies, and More,” dTa easily downloads large sets of files. In contrast to wget, however, you can’t schedule regular, recurring downloads with dTa, but most will find DownThemAll’s graphical interface and Firefox integration a lot easier to deal with than wget’s command-line parameters.

就像第66招里面讲的wget软件一样,DTA可以用来方便的下载大型文件。但不同于wget,DTA不能实现定时下载,也不可以断点续传。下载的文件会完全按照上一次的设置来处理。

发表评论