Wednesday, May 16, 2012

The lazy way to download PDF from a website

I usually stumbled to a website where it has many PDF (slides, research papers) and I don't want to bother to download them one by one.

So I simply use lynx with -dump option and grep:
For example:

lynx -dump http://www.utdallas.edu/~zhiqiang.lin/spring2012.html|grep -o "http://*.*.pdf" > list

So in order to download them from the "list", I use curl (or you can use wget too)


for i in `cat list`;do echo $i;curl -C - $i -O;done







Done, easy eh?

No comments: