comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Google search from within an IDL program
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Google search from within an IDL program [message #92430] Mon, 14 December 2015 06:29 Go to next message
Nuno Ferreira is currently offline  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 Go to previous messageGo to next message
Helder Marchetto is currently offline  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
Re: Google search from within an IDL program [message #92432 is a reply to message #92431] Mon, 14 December 2015 07:38 Go to previous messageGo to next message
Nuno Ferreira is currently offline  Nuno Ferreira
Messages: 16
Registered: July 2003
Junior Member
It worked, many thanks!!

Cheers,

Nuno
Re: Google search from within an IDL program [message #92437 is a reply to message #92432] Tue, 15 December 2015 18:34 Go to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Monday, December 14, 2015 at 8:38:13 AM UTC-7, Nuno Ferreira wrote:
> It worked, many thanks!!
>
> Cheers,
>
> Nuno

You might also check out the WGET function in IDL 8.5. It does the same thing, but saves a few lines of code...
Cheers,
Chris
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Making an array of only the first number of each row in a file
Next Topic: Overlaying data on a MODIS reprojected image created with the TrueColor package

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 07:14:17 PDT 2025

Total time taken to generate the page: 0.00347 seconds