Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Get first three search results from Google for example?

0 views
Skip to first unread message

Nicholas Sherlock

unread,
Jan 27, 2003, 3:59:18 PM1/27/03
to
Download the page with HTTP, then write a parser that can find the three
search results on the file that you just downloaded. To download the page,
you can use Indy HTTP components.

Cheers,
Nicholas Sherlock

"Tom B" <tom@N_O-S_P_A_Mtommyboytjb.fsnet.co.uk> wrote in message
news:lo4b3v86ra52fucnl...@4ax.com...
> How would I do something like that?
>
> Thanks,
>
> Tom


Don Siders

unread,
Jan 27, 2003, 5:38:33 PM1/27/03
to

"Tom B" <tom@N_O-S_P_A_Mtommyboytjb.fsnet.co.uk> wrote in message
news:pf8b3voliugikih9l...@4ax.com...


> I'm getting a "HTTP/1.1 403 Forbidden." error, showing in a message
> box.

There's nothing wrong with your code, or the Indy library. If you'll read
the entire 403 response message, you'll see it's just a little Google
arrogance about how and when you can use their search listings.

It seems that any request having a user agent other those on the Google
approved list will be blocked - because they obviously are breaking the
Google terms of service.

My advice is to use another (more reasonable) search service...

Here's the content that I received:

===========
Forbidden

Your client does not have permission to get URL
<code>/search?q=test</code>
from this server.(Client IP address: 999.999.999.999)

Please see Google's Terms of Service posted at
http://www.google.com/terms_of_service.html

If you believe that you have received this response in error, please send
email to
<a href="mailto:forb...@google.com">forb...@google.com</a>.

Before sending this email, however, please make sure to take a look at our
Terms of Service
(http://www.google.com/terms_of_service.html).

In your email, please send us the <b>entire</b> code displayed below. Please
also send us any information you may know about how you are performing your
Google searches-- for example, "I'm using the Opera browser on Linux to do
searches from home. My Internet access is through a dial-up
account I have with the FooCorp ISP." or "I'm using the Konqueror browser on
Linux to search from my job at myFoo.com. My machine's IP address is
10.20.30.40, but all of myFoo's web traffic goes through some kind of proxy
server whose IP address is 10.11.12.13." (If you don't know any information
like this, that's OK. But this kind of information can help us track down
problems, so please tell us what you can.)

We will use all this information to diagnose the problem, and we'll
hopefully have you back up and Googlin' again quickly!

Please note that although we read all the email we receive, we are not
always able to send a personal response to each and every email. So don't
despair if you don't hear back from us!

Also note that if you do not send us the <b>entire</b> code below, <i>we
will not be able to help you</i>.

Best wishes,
The Google Team
===========


--
Don Siders [Team Indy]

Join the Indy Docs project! (http://www.indyproject.org/teams/docs)

ELKNews - Get your free copy at http://www.atozedsoftware.com

Bas Gooijen

unread,
Jan 27, 2003, 5:46:18 PM1/27/03
to
iirc google has some kind of interface you can query, which returns the
results in XML-format.

Bas

"Tom B" <tom@N_O-S_P_A_Mtommyboytjb.fsnet.co.uk> wrote in message

Don Siders

unread,
Jan 27, 2003, 6:38:23 PM1/27/03
to

"Bas Gooijen" <bas_g...@yahoo.com> wrote in message
news:3e35b6aa$1...@newsgroups.borland.com...

> iirc google has some kind of interface you can query, which returns the
> results in XML-format.

There is the Google API beta at http://www.google.com/apis/.


--
Don

sav

unread,
Jan 28, 2003, 3:15:06 AM1/28/03
to
Or use the beta SOAP service (api.google.com) if your program is
for personal use.

Michael W

unread,
Jan 28, 2003, 12:23:01 PM1/28/03
to

"Don Siders" <muds...@apostrophe.net> wrote in message
news:719711861762...@apostrophe.net...

>
> "Tom B" <tom@N_O-S_P_A_Mtommyboytjb.fsnet.co.uk> wrote in message
> news:pf8b3voliugikih9l...@4ax.com...
>
>
> > I'm getting a "HTTP/1.1 403 Forbidden." error, showing in a message
> > box.
>
> My advice is to use another (more reasonable) search service...

Or set the IdHTTP component to make it look like IE.

Mike

Don Siders

unread,
Jan 28, 2003, 6:36:22 PM1/28/03
to

"Michael W" <no...@spamcentral.com> wrote in message
news:3e36...@newsgroups.borland.com...

> > My advice is to use another (more reasonable) search service...
>
> Or set the IdHTTP component to make it look like IE.

True. There's always that, too.


--
Don

Ken White

unread,
Feb 3, 2003, 10:24:51 AM2/3/03
to
Tom,

> What did you mean, "set it to look like IE"?

Change the TIdHttp.Request.UserAgent.

Ken
---
Ken White
kwh...@adpsi.com

Clipper Functions for Delphi and C++ Builder
http://www.adpsi.com

0 new messages