Google search from within an IDL program [message #92430] |
Mon, 14 December 2015 06:29  |
Nuno Ferreira
Messages: 16 Registered: July 2003
|
Junior Member |
|
|
Hi,
I am testing the possibility of doing a Google Search from within an IDL program with the following code:
query = "test"
url = 'http://www.google.com/?#q=' + query
ourl = obj_new('IDLnetURL')
test = ourl->get(filename='d:\test.html', url=url)
obj_destroy, ourl
The ".html" file is created, looks like a Google page with today's doodle, but it has no results. Can someone tell me what I am doing wrong? Thanks!
Nuno
|
|
|
Re: Google search from within an IDL program [message #92431 is a reply to message #92430] |
Mon, 14 December 2015 07:11   |
Helder Marchetto
Messages: 520 Registered: November 2011
|
Senior Member |
|
|
On Monday, December 14, 2015 at 2:29:59 PM UTC, Nuno Ferreira wrote:
> Hi,
>
> I am testing the possibility of doing a Google Search from within an IDL program with the following code:
>
> query = "test"
> url = 'http://www.google.com/?#q=' + query
> ourl = obj_new('IDLnetURL')
> test = ourl->get(filename='d:\test.html', url=url)
> obj_destroy, ourl
>
> The ".html" file is created, looks like a Google page with today's doodle, but it has no results. Can someone tell me what I am doing wrong? Thanks!
>
> Nuno
Hi,
this works for me:
query = "test"
url = 'http://www.google.com/search?hl=en&q='+query
ourl = obj_new('IDLnetURL')
test = ourl->get(filename='test.html', url=url)
obj_destroy, ourl
It's not going to be fun to get the results out though :-)
Cheers,
Helder
|
|
|
|
|