Hello!
Thanks so much for the patched Pygoogle!
Also, please, can you give me some more information about how to use
google search api?
I am a newbie in Python, and I still try to cope with it. Thanks to some
experience in other
programing languages, I think I progress well, but I am not a
professional user/programer;
quite far from that.
Best,
Petar
On 20/11/10 21:27, Stefan Sonnenberg-Carstens wrote:
Am 20.11.2010 20:24, schrieb Petar Milin:
Thanks so much! However, 'options lang:de' does not exactly the same
as would 'lr=lang_de'? Am I right?
You're right.
Since I need number of hits, I would like to have the best, most
correct values! :-)
Sincerely,
PM
On Sat, Nov 20, 2010 at 12:00 PM,<python-list-requ...@python.org>
wrote:
I took a look into pygoogle source code.
It does not send the 'lr' parameter to google.de (as it does not with
many more ...).
I patched it to enable the following (what you needed):
>>> from pygoogle import pygoogle
>>> g = pygoogle('linux site:.edu')
>>> g.lr = 'lang_de'
>>> g.pages = 2
>>> print 'German',g.get_result_count()
German 3910
>>> g.lr = 'lang_en'
>>> print 'English',g.get_result_count()
English 1140000
>>> g.lr = 'lang_cn'
>>> print 'Chinese',g.get_result_count()
Chinese 1210000
>>>
I have attached my patched version of pygoogle.
BTW: the google search api is very straight forware.
Perhaps it is easier to create a custom bot to do your queries.
Cheers,
--
http://mail.python.org/mailman/listinfo/python-list