Problem with curl
Hi everyone,
I'm currently working on a Perl Script which is supposed to process the HTML code that is returned by Google after searching for a user-defined string. But I always get a 501 ('Not Implemented') error message back from Google. The curl command string looks like this:
curl http://www.google.com/search? --data q=query --data hl=en -g
Does anyone have an idea what my mistake is?
Greetings,
durandal
I'm currently working on a Perl Script which is supposed to process the HTML code that is returned by Google after searching for a user-defined string. But I always get a 501 ('Not Implemented') error message back from Google. The curl command string looks like this:
Code:
curl http://www.google.com/search? --data q=query --data hl=en -g
Does anyone have an idea what my mistake is?
Greetings,
durandal
Comments
Say, if 'query' is actually a Perl variable that's being mismangled?
Originally posted by Kickaha
Say, if 'query' is actually a Perl variable that's being mismangled?
Well, 't proved to be a very simple mistake. The option -g that I used stands for 'globoff'. But I needed -G, which tells curl to treat the --data items as GET arguments to the given URL...
Anyway, thx
durandal
EDIT: Just saw that you also have to use the -A option to specify a user-agent or Google will return an error.