Q
Q
QQ2016-06-29 18:04:03
linux
QQ, 2016-06-29 18:04:03

How to download files via Wget without @ in the name?

Hello.
Actually that's the question, when you download the entire site, then some files have the name:
example.com/css/style.css?3
Wget downloads this file to the /css folder , however ? replaces with @ - /css/[email protected]
I would like to receive files with the standard name /css/style.css

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Burov, 2016-06-29
@botaniQQQ


-E
--adjust-extension
If a file of type application/xhtml+xml or text/html is downloaded and the URL does not end with the regexp \.[Hh][Tt][Mm][Ll]?, this option will cause the suffix .html to be appended to the local filename. This is
useful, for instance, when you're mirroring a remote site that uses .asp pages, but you want the mirrored pages to be viewable on your stock Apache server. Another good use for this is when you're downloading CGI-
generated materials. A URL like site.com/article.cgi?25 will be saved as article.cgi?25.html.
Note that filenames changed in this way will be re-downloaded every time you re-mirror a site, because Wget can't tell that the local X.html file corresponds to remote URL X (since it doesn't yet know that the URL produces
output of type text/html or application/xhtml+xml.As
of version 1.12, Wget will also ensure that any downloaded files of type text/css end in the suffix .css, and the option was renamed from --html-extension , to better reflect its new behavior.The old option name is
still acceptable, but should now be considered deprecated.At
some point in the future, this option may well be expanded to include suffixes for other types of content, including content types that are not parsed by Wget.
well, or for each request, specify the file name manually
-O file
--output-document=file

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question