如何通过使用递归wget获取所有链接的列表?


Answers:


0

我使用此命令仅获取YouTube视频(https://www.youtube.com/watch?v=XXXXXXXXX

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

您可以使用此选项并更改这样的grep选项:对于我的示例,如果您想要跳过YouTube视频,请使用'grep -v':

wget --spider --force-html -r -l2 "https://www.youtube.com"  2>&1 | grep -v 'watch?v='
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.