Wget -accept template files

I am trying to write a script that downloads all the files linked on a specific page. These files must contain specific lines and have certain extensions. Let's say that I want to download all files containing the string "1080" or "1080p", etc., and which have the extension ".mov" .avi ".wmv" etc. This should show that there are several lines and extension lines.

This is what I have done so far:

wget -Amov -r -np -nc -l1 --no-check-certificate -e robots=off http://www.example.com

Any help really appreciated.

Thanks.

+4
source share
1 answer

You can add a template for the -A switch, for example:

wget -A "*1080*mov" -r -np -nc -l1 --no-check-certificate -e robots=off http://www.example.com

In this example, all files with "1080" will be received, except for gif and png files:

wget -A "*1080*" -R gif,png -r -np -nc -l1 --no-check-certificate -e robots=off http://www.example.com
+5

All Articles