Does Pygoogle allows for advanced search options?

Chris Rebert clp2 at
Thu Nov 18 09:28:03 CET 2010

On Wed, Nov 17, 2010 at 11:54 PM, neocortex <pmilin at> wrote:
> Hello All,
> Can anyone help me with the Pygoogle:
> from pygoogle import pygoogle

You're apparently talking about
rather than ; the former appears to
have "borrowed" the latter's name without permission. Oi!

> word = u'something'
> request_word = word.encode('utf-8')
> request = ('' % request_word)
> g = pygoogle(request)
> g.get_result_count()
> Now, I realized that domain restriction works ( 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 , and
lines 68 & 102 of

Research for random person => too much idle time

More information about the Python-list mailing list