- Save the source code of the web page
- Use perl to filter out the relative links like this: perl -ne '@files = split /target=/; foreach(@files){ if (/(http*.mp3)/){ print $1,"\n" }' source_code > abc
- Use wget to download the files: wget -i abc
Thursday, December 15, 2005
Some tips on using regular expressions to download files
It is quite common that sometimes we want to download a bunch of files listed on a web page. Of course you can use your mouse to right click the link then save it to your hard disk. However, if there are so many links, it would be quite tedious to do so. For a lazy man like me, I would do the following things:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment