This is a Google library called 'xgoogle'. Current version is 1.0.

It's written by Peteris Krumins ([email protected]).
His blog is at  --  good coders code, great reuse.


At the moment it contains just the Google Search module xgoogle/
You can use it to do all kinds of quick searches on Google.

Read more about it here:

Here is an example usage of it:

    >>> from import GoogleSearch
    >>> gs = GoogleSearch("catonmat")
    >>> gs.results_per_page = 25
    >>> results = gs.get_results()
    >>> for res in results:
    ...   print res.title.encode('utf8')


    good coders code, great reuse
    MIT's Introduction to Algorithms, Lectures 1 and 2: Analysis of ...
    catonmat - Google Code

The GoogleSearch object has several public methods and properties:

    method get_results() - gets a page of results, returning a list of SearchResult objects.
    property num_results - returns number of search results found.
    property results_per_page - sets/gets the number of results to get per page.
    property page - sets/gets the search page.

A SearchResult object has three attributes -- "title", "desc", and "url". They are Unicode strings, so do a proper encoding before outputting them.

That's it. Have fun!