This question already has an answer here:

I often need to download sets of links from a webpage and it's very inefficient having to click all the links one by one. For example, at the moment I want to download the lecture notes on this webpage. Is there some way I can batch download them? I am using Linux and Firefox in case that information is useful

marked as duplicate by random Mar 20 '17 at 7:13

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


This line of code will download each pdf from the page.
It's quick and dirty and could probably be optimized (especially since I'm using both curl and wget):

for file in $(curl https://ocw.mit.edu/courses/mathematics/18-102-introduction-to-functional-analysis-spring-2009/lecture-notes/ | grep .pdf | cut -d'"' -f2); do wget https://ocw.mit.edu/$file; done
  • wget -A pdf -m -p -E -k -K -np https://ocw.mit.edu/courses/mathematics/18-102-introduction-to-functional-analysis-spring-2009/lecture-notes/ – Michael D. Mar 20 '17 at 10:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.