On Jun 20, 2008, at 4:47 PM, [EMAIL PROTECTED] wrote:
I am trying to use wget to access Google apis for automatically
downloading query results as given on http://code.google.com/apis/
ajaxsearch/documentation/
But when I type curl --referer=http://www.my-ajax-site.com 'http://
ajax.googleapis.com/ajax/services/search/web?v=1.0&q=Paris%20Hilton'
I assume you mean "wget" here and not "curl"?
I get the following error:
--17:42:58-- http://ajax.googleapis.com/ajax/services/search/web?
v=1.0
=> [EMAIL PROTECTED]'
Resolving ajax.googleapis.com... 66.102.1.100, 66.102.1.101,
66.102.1.102, ...
Connecting to ajax.googleapis.com|66.102.1.100|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 81 [text/javascript]
0K
100% 6.79 MB/s
17:42:58 (6.79 MB/s) - [EMAIL PROTECTED]' saved [81/81]
'q' is not recognized as an external or internal command, operable
program or batch file.
Your shell appears to think the "&" in the URL has not been escaped.
I'm not sure why it thinks that, since you've enclosed it in single
quotes, which should be sufficient. And copying and pasting your
command to my terminal (replacing "curl" with "wget") works for me:
--2008-06-20 16:56:55-- http://ajax.googleapis.com/ajax/services/
search/web?v=1.0&q=Paris%20Hilton
Resolving ajax.googleapis.com... 64.233.167.100, 64.233.167.101,
64.233.167.102
Connecting to ajax.googleapis.com|64.233.167.100|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2916 (2.8K) [text/javascript]
Saving to: `web?v=1.0&q=Paris Hilton'
100%[============================================================>]
2,916 --.-K/s in 0.02s
2008-06-20 16:56:55 (148 KB/s) - `web?v=1.0&q=Paris Hilton' saved
[2916/2916]
I'm using the bash shell on Mac OS X 10.4.11. What shell and OS are
you using? I have wget 1.11.2. What version do you have?