You are not logged in.
Hello!
I need to wget a few (maybe 20 -.- ) html files that are linked on one html page (same domain) recursively, but the robots.txt there disallows wget. Now I could just ignore the robots.txt... but then my wget would also ignore the info on forbidden links to dynamic sites which are forbidden in the very same robots.txt for good reasons. And I don't want my wget pressing random buttons on that site. Which is what the robots.txt is for. But I can't use the robots.txt with wget.
Any hints on how to do this (with wget)?
Last edited by whoops (2014-02-23 17:52:31)
Offline
Would wget ignore that part of the robots.txt if you specify a different user-agent?
Offline
That was the first thing I tried, didn't seem to make a difference. Should it / did I do it wrong?
Offline
I know suggesting an alternative is not really a solution. But curl is significantly faster, more powerful and provides a native C interface. Have you tried using it? Or, is there a specific reason you must use wget?
All the best,
-HG
Last edited by HalosGhost (2014-02-23 17:13:57)
Offline
That was the first thing I tried, didn't seem to make a difference. Should it / did I do it wrong?
No it was a wild guess ![]()
Offline
Have you tried using it? Or, is there a specific reason you must use wget?
Only stubborness ![]()
Stupid website -.- what do they even think they achieve by disallowing wget? I should just use the ignore option and let wget "click" on every single button in their php interface. But nooo, instead I waste time trying to figure out a way to exclude those GUI links from being followed even though wget would be perfectly set up to comply to that automatically if it weren't for that one entry to "ban" it. *grml*
Will definitely try curl next time though - thanks for the suggestion!
And now, I present...
THE ULTIMATIVE SOLUTION**:
sudo sed -i 's/wget/wgot/' /usr/bin/wgetYAY.
./solved!
** stubborn version.
Last edited by whoops (2014-02-23 17:51:19)
Offline
That is... crafty
Offline