views:

40

answers:

1

Hi, I need a code with which I can send queries to Google and get the results back for some processing. i am mostly interested in retrieving the snippets of the results. It would be nice if I can do this without installing any extra packages for Python. A pre-written api would also do the trick. Thanks

+2  A: 

A simple url based fetching technique using urllib2:

See an example with google API

pyfunc
thanks. but as i mentioned, I need the snippets generated by google for each returned link and not the whole webpage.
Hossein
@Hossein: The page is a result page which should contain the snippets. You could parse and get it. Of course the easier way would be to use Google Apis
pyfunc