LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Any ideas to pass the "ERROR 400: Bad Request." of WGET? (https://www.linuxquestions.org/questions/programming-9/any-ideas-to-pass-the-error-400-bad-request-of-wget-720215/)

frenchn00b 04-19-2009 11:41 AM

Any ideas to pass the "ERROR 400: Bad Request." of WGET?
 
Hello,

Although wget is very powerful, wget can hangs on anti-robot websites.
So something that works it to :
Code:

lynx -dump URL
but that
Code:

wget -k
I have to say is very handy and useful.

Any ideas how to make wget avoiding this ERROR 400 ?

frenchn00b 04-19-2009 11:46 AM

Quote:

Originally Posted by frenchn00b (Post 3514192)
Hello,

Although wget is very powerful, wget can hangs on anti-robot websites.
So something that works it to :
Code:

lynx -dump URL
but that
Code:

wget -k
I have to say is very handy and useful.

Any ideas how to make wget avoiding this ERROR 400 ?



SOLVED

add --user-agent Mozilla/4.0

Code:

beta:~/Desktop mario$ wget --user-agent Mozilla/4.0 http://www.englisch-hilfen.de/mp3/leann_rime.mp3
--01:11:22--  http://www.englisch-hilfen.de/mp3/leann_rime.mp3
          => `leann_rime.mp3'
Resolving www.englisch-hilfen.de... done.
Connecting to www.englisch-hilfen.de[87.106.2.52]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1,910,784 [audio/x-mpeg]

100%[====================================>] 1,910,784    607.03K/s    ETA 00:00

01:11:26 (607.03 KB/s) - `leann_rime.mp3' saved [1910784/1910784]



All times are GMT -5. The time now is 05:30 PM.