2

I would like to get a list of all of all of the links on a given webpage (recursively). I can't seem to find out how to do it without just going a wget -r . I don't want to save all of the junk, just the links. Any ideas?

1

1 Answer 1

0

I use this commands to get only YouTube videos (https://www.youtube.com/watch?v=XXXXXXXXX)

wget --spider --force-html -r -l2 "https://www.youtube.com"  2>&1 | grep --color  'watch?v='

You can use this and change grep options like this: For my example ,if yuou want to skip YouTube videos use 'grep -v ':

wget --spider --force-html -r -l2 "https://www.youtube.com"  2>&1 | grep -v 'watch?v='

You must log in to answer this question.

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