How to *Search* with google from inside my programme and get thesearch result?

F

Frank Potter

I want to search something by a key word from inside my py script.
The using google idea comes to my mind first because write a search
programme from scratch is not so easy.

I want to take advantage of goolge results, but I don't know how.
To extract the result from html of google can get the result, but it's not
reliable and stable because the html structure my be changed any time.

Does google supply some webservice to programmers? I did see
some a tool use google to search and use it's result from the programme very
well. Its name is "Email catcher&sender 2.10", which can be download
at http://www.worldminer.com/download.htm. Windows users can take a
look at it. It supports more than google, but yahoo and some other search
engines. How does it do it? I really need some hints.
 
F

Fuzzyman

Frank said:
I want to search something by a key word from inside my py script.
The using google idea comes to my mind first because write a search
programme from scratch is not so easy.

I want to take advantage of goolge results, but I don't know how.
To extract the result from html of google can get the result, but it's not
reliable and stable because the html structure my be changed any time.

Does google supply some webservice to programmers? I did see
some a tool use google to search and use it's result from the programme very
well. Its name is "Email catcher&sender 2.10", which can be download
at http://www.worldminer.com/download.htm. Windows users can take a
look at it. It supports more than google, but yahoo and some other search
engines. How does it do it? I really need some hints.

If you'd like a (simple) example of using the google webservice, have a
look at googlerank -
htpp://www.voidspace.org.uk/python/recipebook.shtml#google

In practise I've found the yahoo web services faster, simpler and less
restrictive, so you may want to try that.

All the best,

Fuzzyman
http://www.voidspace.org.uk/python/index.shtml
 
B

Brett g Porter

I said:
Googling for "google api" gets you to:

http://www.google.com/apis/

It appears to be a SOAP API, which you can access with python, but I
think you'll need a third-party library. Googling for "python soap"
gets you:

http://www-128.ibm.com/developerworks/library/ws-pyth5/

which might be a place to start.
Or even easier:
http://pygoogle.sourceforge.net/

SUMMARY
-------
This module allows you to access Google's web APIs through SOAP,
to do things like search Google and get the results programmatically.
This API is described here:
http://www.google.com/apis/

SYSTEM REQUIREMENTS
-------------------
Requires Python 2.0 or later

Requires the SOAPpy library from the Python Web Services project
(http://pywebsvcs.sourceforge.net). We include an older version, but
its use is now deprecated (and will go away completely in future
releases). Unfortunately, versions of SOAPpy prior to 0.11.3 will not
work correctly, and thus PyGoogle will fall back on the included
SOAP.py library if an earlier version is found.

// BgP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top