Question

I am trying to write a script that downloads all the files linked in a certain page. These files must contain specific strings and have certain extensions. Let's say that I want to download all files that contain the string "1080" or "1080p" etc. and that have as extension ".mov" ".avi" ".wmv" etc. This was to show that both the strings and the extensions are multiple.

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 is really apreciated.

Thank you.

Was it helpful?

Solution

You can add a pattern for the -A switch, like this:

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

This example will get all files with "1080", except gif & png files:

wget -A "*1080*" -R gif,png -r -np -nc -l1 --no-check-certificate -e robots=off http://www.example.com
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top