Re: help with accessing Google APIs

2008-06-20 Thread Ryan Schmidt

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.0q=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.0q=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.0q=Paris Hilton'

100%[]  
2,916   --.-K/s   in 0.02s


2008-06-20 16:56:55 (148 KB/s) - `web?v=1.0q=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?





Re: wget doesn't load page-requisites from a) dynamic web page b) through https

2008-06-18 Thread Ryan Schmidt

On Jun 18, 2008, at 5:17 AM, Stefan Nowak wrote:


where do I set the locale of the CLI environment of MacOSX?


You should set the LANG environment variable to the desired locale,  
and one which is supported on your system; you can look at the  
directories in /usr/share/locale to see what locales are available.


For example, if you want American English, set LANG to en_US.

In the Bash shell, you can type export LANG=en_US

In the Tcsh shell, you can type setenv LANG en_US

To find out which shell you use, type echo $SHELL