Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to figure out WGET for downloading some videos at

This page is an index page, and contains links to a page for each video; each page then has a direct link to a video. Something like;

What I'd like to do is tell WGET to spider the site by following either video.aspx?* or .mp4 links, recurively, for two levels. I can figure out

WGET -r -l2

and then I get stuck. Any suggestions greatly appreciated.

EDIT: Thanks to @mloskot, I got the answer;

WGET -r -l2 -A.mp4,video*.aspx*, 
share|improve this question

migrated from Jan 24 '10 at 23:19

This question came from our site for professional and enthusiast programmers.

up vote 6 down vote accepted

Learn about option -A in the 2.11 and 4.2 chapter of wget manual and use this option to specify comma-separated lists of file name suffixes or patterns to accept. In other words, use -A to specify that you want to download only files with mp4 extension:

WGET -r -l2 -A.mp4
share|improve this answer
Perfect! You helped me get the right command line, which I'm including back in the OP. – Steve Cooper Jan 24 '10 at 23:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .