Harry
2009-07-12 10:58:15
Wget is win, we all know that. One of the most simple looking, but actually most advanced terminal client.
So, you want to download an entire site's content, eh? Using wget it is easy!
Now you must install wget (it is installed on 99% of Linuxes by default)
Now you have `wget http://some.cool.web.site/
But oh noes, they have a robots.txt file to disallow you to index some parts of their website. No problem, ignore that stupid text file. [Note: some sites have this file to prevent abuse, or waste of their bandwidth; use it wisely]
`wget -e robots=off http://some.cool.web.site/
You trying to ignore the directories above your current one? Append -np :)
`wget -np -e robots=off http://some.cool.web.site/dicrecory/I/want/
Your downloads always timing out, and leaving incomplete files? Append -c.
`wget -np -c -e robots=off http://some.cool.web.site/file.that.likes.to.timeout.sh
You dislike how wget dumps all the files into one folder? Want them in recursive folders, such as how the server has it? -r is your friend.
`wget -r -np -c -e robots=off http://some.cool.web.site/oh/noes/so/many/folders/on/this/website/
Tired of websites blocking the wget useragent? (websites usually do this to prevent abuse and kiddies from spidering their site with wget that abuses their bandwidth) -U is fun to mess around with.
`wget -r -np -c -U "Mozilla/5.0 (X11; U; Linux i686; nl; rv:1.7.3) Gecko/20040916" -e robots=off http://some.cool.web.site/admin/who/dislikes/wget/
Be careful when using this command; spoofed Useragents can be dangerous if you use a blacklisted one, the admin may IP ban you. I recommend using the Useragent from your Firefox.
Final result!
`wget -r -np -c -U "Mozilla/5.0 (X11; U; Linux i686; nl; rv:1.7.3) Gecko/20040916" -e robots=off http://some.cool.web.site/
Some more features, not used enough by me to care.
`wget -help
Have fun leeching, and messing around with the power of wget.
~ Harry
So, you want to download an entire site's content, eh? Using wget it is easy!
Now you must install wget (it is installed on 99% of Linuxes by default)
Now you have `wget http://some.cool.web.site/
But oh noes, they have a robots.txt file to disallow you to index some parts of their website. No problem, ignore that stupid text file. [Note: some sites have this file to prevent abuse, or waste of their bandwidth; use it wisely]
`wget -e robots=off http://some.cool.web.site/
You trying to ignore the directories above your current one? Append -np :)
`wget -np -e robots=off http://some.cool.web.site/dicrecory/I/want/
Your downloads always timing out, and leaving incomplete files? Append -c.
`wget -np -c -e robots=off http://some.cool.web.site/file.that.likes.to.timeout.sh
You dislike how wget dumps all the files into one folder? Want them in recursive folders, such as how the server has it? -r is your friend.
`wget -r -np -c -e robots=off http://some.cool.web.site/oh/noes/so/many/folders/on/this/website/
Tired of websites blocking the wget useragent? (websites usually do this to prevent abuse and kiddies from spidering their site with wget that abuses their bandwidth) -U is fun to mess around with.
`wget -r -np -c -U "Mozilla/5.0 (X11; U; Linux i686; nl; rv:1.7.3) Gecko/20040916" -e robots=off http://some.cool.web.site/admin/who/dislikes/wget/
Be careful when using this command; spoofed Useragents can be dangerous if you use a blacklisted one, the admin may IP ban you. I recommend using the Useragent from your Firefox.
Final result!
`wget -r -np -c -U "Mozilla/5.0 (X11; U; Linux i686; nl; rv:1.7.3) Gecko/20040916" -e robots=off http://some.cool.web.site/
Some more features, not used enough by me to care.
`wget -help
Have fun leeching, and messing around with the power of wget.
~ Harry