문제

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.

도움이 되었습니까?

해결책

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
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top