473,785 Members | 2,784 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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.
Feb 15 '06 #1
4 1373
I V
Frank Potter wrote:
Does google supply some webservice to programmers? I did see


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.

Feb 15 '06 #2
Frank Potter <co*******@gmai l.com> wrote:
...
Does google supply some webservice to programmers? I did see


Yep, see http://www.google.com/apis/index.html .
Alex
Feb 15 '06 #3

Frank Potter wrote:
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.o rg.uk/python/recipebook.shtm l#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

Feb 15 '06 #4
I V wrote:
Frank Potter wrote:
Does google supply some webservice to programmers? I did see


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 programmaticall y.
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
Feb 15 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
4234
by: Petre Huile | last post by:
I have designed a site for a client, but they have hired an internet marketing person to incrase their search engine ranking and traffic. He wants to put extra-large fonts on every page which will make the design looks a bit rediculous. He also said that the big text cannot be hidden. I am just trying to find a compromise. Here are the questions: (1) Is it true that a page with an <H1> tag and very big font size will make a search...
5
3003
by: George | last post by:
Hi, Anyone has the background for explaining? I have made a search on my name and I have got a link to another search engine. The link's title was the search phrase for the other search engine (a wicked phrase). Some but not all of the words of that phrase exist in my website. I reported it and they removed the link but did not give explanations.
10
3141
by: pembed2003 | last post by:
Hi all, I asked this question in the C group but no one seems to be interested in answering it. :-( Basically, I wrote a search and replace function so I can do: char source = "abcd?1234?x"; char search = '?'; char* replace = "***"; char* result = search_and_replace(source,search,replace);
20
10763
by: spasmous | last post by:
main() { float * f; initialize_f(f); // ...use f for processing free(f); }
64
6422
by: Manfred Kooistra | last post by:
I am building a website with identical content in four different languages. On a first visit, the search engine determines the language of the content by the IP address of the visitor. What the user sees is content in only one language at a time. He or she can then switch to another language and set this as the preferred language, but again he or she sees content in only this one other language. The question now is: How do I get search...
2
1816
by: Darko | last post by:
I have a Microsoft (R) Visio (TM) document, which contains a link inside (eg. to "http://blabla/"). When I do a full-text search from within Windows Explorer, searching for "blabla", it finds that document. But when I view the document as a plain text file, viewing it in Notepad or Wordpad, or even programmatically searching for the text "blabla" from a C programme, then it can't be found. I would like to make a C programme that would be...
16
2136
by: Kent Feiler | last post by:
If I understand the general direction of recent posts, the idea is to improve the quality of html/css by soliciting help from the various browsers. Browsers can certainly detect problems but they have no sensible place to report them and no way to prevent the same problem from happening over-and-over in multiple sites around the world. That idea simply doesn't work. But how about this one. Suppose we have all of those search engine...
5
2631
by: th1982 | last post by:
HI All I have a search page' s result which view 3results/per page,but my "next" link to view next page is not working. Here is my code : <?php // Get the search variable from URL $string = @$_GET ; $trimmed = trim($string); //trim whitespace from the stored variable // rows to return
5
3258
by: Kalpana Durairaj | last post by:
I want to insert my image within search result anchor(say google search results). <a href="http://www.codeproject.com">Code Project <!-- Google search result link--> <img src="myimage.png" style="text-decoration:none"/> - My Code </a> Used javascript to parse the google search page, collect search results and to insert the above said image. In IE, the image was displayed without underline as we applied textDecoration style as none....
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10329
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10152
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7500
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.