3

I would like to get the files without headers. I have tried many things like

wget --header="" http://xxxxx.xxxxxx.xx 

How can I get any files without headers?

2 Answers 2

0

This doesn't quite answer the question, but I got here by looking up "remove default header wget" so I'll put in my 2 cents.

You can remove the User-Agent header with -U "". This was useful for me because the Geometry Dash servers will reject your request if it has a user agent.

Sign up to request clarification or add additional context in comments.

Comments

-1

Could you assign the output of wget to a string, then use something else to process it to drop headers (or parse them out of the text)?

For example, using bash and grep, you can store the html from a webpage as a string, then use grep to extract the text in the <body> section:

w1=$(wget --quiet --output-document - www.example.com) echo $w1 | grep --only-matching "<body>.*</body>" 

which gives the output below (I have added some newlines to improve how it displays here):

<body> <div> <h1>Example Domain</h1> <p> This domain is established to be used for illustrative examples in documents. You may use this domain in examples without prior coordination or asking for permission. </p> <p> <a href="http://www.iana.org/domains/example">More information...</a></p> </div> </body> 

1 Comment

I'm not sure that's what they mean - I interpreted it as "don't send headers to the server"

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.