15
5
I'm using wget --mirror --html-extension --convert-links
to mirror a site, but I end up with lots of filenames in the format post.php?id=#.html
. When I try to view these in a browser it fails, because the browser ignores the query string when loading the file. Is there any way to replace the ?
character in the filenames with something else?
The answer of --restrict-file-names=windows
worked correctly. In conjunction with the flags --convert-links
and --adjust-extension
/-E
(formerly named --html-extension
, which also works but is deprecated) it produces a mirror that behaves as expected.
wget --mirror --adjust-extension --convert-links --restrict-file-names=windows http://www.example
this is not quite correct, wget, with no interruption, for a URL like
– Tzury Bar Yochay – 2012-07-31T07:22:38.253http://site.com/article.cgi?25
will be saved asarticle.cgi?25.html
see section 2.7 at http://www.gnu.org/software/wget/manual/wget.html#HTTP-Options