It is a very basic Google search module for Python. It has a limitation of only 64 results. If you want more results, see xgoogle.
Source of module is here: https://code.google.com/p/pygoogle/
Google's Search API returns 4 or 8 results per 'page'. So, if you want 40 results, you will need to request 4x10pages or 8x5pages. pygoogle uses 8 results per page (default, use rsz to change this to 4).
Usage in module:
from pygoogle import pygoogle
g = pygoogle('quake 3 arena')
# set number of results pages
g.pages = 5
# set language
g.hl = 'ru'
# query and returns the number of results
print g.get_result_count()
# query and returns list of result URLs
print g.get_urls()
# query and prints results (for command line)
g.display_results()
# query and returns a dict of page-wise urls
print g.search_page_wise()
or in command line
python pygoogle.py quake 3 arena
- svn checkout http://pygoogle.googlecode.com/svn/trunk/ pygoogle-read-only
- python setup.py build
- sudo python setup.py install
or
$ pip install pygoogle-simple