On Wed, Nov 17, 2010 at 11:54 PM, neocortex <pmi...@gmail.com> wrote: > Hello All, > Can anyone help me with the Pygoogle: > from pygoogle import pygoogle
You're apparently talking about http://code.google.com/p/pygoogle/ rather than http://pygoogle.sourceforge.net/ ; the former appears to have "borrowed" the latter's name without permission. Oi! > word = u'something' > request_word = word.encode('utf-8') > request = ('%s+site:.edu' % request_word) > g = pygoogle(request) > g.get_result_count() > > Now, I realized that domain restriction works (site:.edu etc.), but I > would like to be able to control for language too. Is that possible > with the Pygoogle? If not, how can I make that happen? The library doesn't seem to have built-in support for filtering by language (and Google lacks a search query-string-based operator for that), but it looks like you could implement that feature by adding an "lr" parameter with an appropriate value to the query `args` dictionary. See the "lr?" entry under "Web Search Specific Arguments" on http://code.google.com/apis/websearch/docs/reference.html , and lines 68 & 102 of pygoogle.py. Cheers, Chris -- Research for random person => too much idle time http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list