Borschik
Borschik

Reputation: 3

wget replaces '#' with 'index.html#'

When I use wget it has troubles with '#' sign in hrefs. It replaces '#' with 'index.html#' and it usually breaks scripts.

Command I am using is:

wget -r -k -l 10 -p -P C:\landings http://example.com/

Can something be done about this problem?

Upvotes: 0

Views: 114

Answers (2)

Álvaro González
Álvaro González

Reputation: 146390

That's what the -k switch (aka --convert-links) is meant to do:

After the download is complete, convert the links in the document to make them suitable for local viewing. This affects not only the visible hyperlinks, but any part of the document that links to external content, such as embedded images, links to style sheets, hyperlinks to non-HTML content, etc.

If you don't need it, just remove it.

Upvotes: 1

Prototype
Prototype

Reputation: 132

By default, the <a> tag redirects to # ( basically, the default tag is <a href="#">Text</a> ).

You'll have to check that the href has been properly set, otherwise you'll always get the index.html# as a result, instead of the page you are looking for.

Upvotes: 0

Related Questions