Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I downloaded a website using:

wget -c --mirror -p http://www.somewebsite.com

for offline viewing and I just remembered that I forgot the --convert-links option! They are all on my hard drive right now. Is there a way to do --convert-links without redownloading the whole website?

share|improve this question

2 Answers 2

Straightforward one: serve local directory with something like SimpleHTTPServer, then re-wget from localhost with appropriate options.

share|improve this answer
1  
Quite a good idea, why the down vote? –  phunehehe Feb 14 '11 at 9:32
2  
I should add that one shout edit /etc/hosts to fake localhost as the website being mirrored. And this will only work well if the links all point to the same webpage (i.e no hot-linked images). –  phunehehe Feb 14 '11 at 9:34
    
What is SimpleHTTPServer? Is it the Python module? If so, can you show how to use it (so I can revoke my careless downvote). –  Tshepang Feb 14 '11 at 13:01
1  
@Tshepang Yes Python is pretty awesome with the huge load of modules :) SimpleHTTPServer is my favorite –  phunehehe Feb 14 '11 at 15:10

Also, don't forget to use the option --timestamping, or add timestamping=on to "~/.wgetrc". It ensures that when you re-mirror the website, you don't re-download the whole website, but only changed/new files. See the section Time-Stamping in manpage of wget for more.

FWIW I use this to mirror my blog:

wget --mirror --adjust-extension --convert-links --no-cookies --timestamping http://example.com --output-file=log-blog

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.