Getting number of hits from Google
Hello! For quite some time, I am looking for a solution to the problem of getting number of hits for a list of, let say, 200-300 words, from a search engine. I would prefer Google, but this seems not possible. I tried with the PyGoogle (from http://code.google.com/p/pygoogle/), but it stops delivering number of hits after 20-50 words. Please, can anyone help me with this. I am starting to be desperate. Sincerely, PM -- http://mail.python.org/mailman/listinfo/python-list
Is there an easy way to sort a list by two criteria?
Hello! I am a newbie in Python. Recently, I get stuck with the problem of sorting by two criteria. In brief, I have a two-dimensional list (for a table or a matrix). Now, I need to sort by two columns, but I cannot figure out how to do that. I read somewhere that it is possible to do: >>> table.sort().sort() but it does not work. Can anyone help me with this? PS: I am using Python under Ubuntu 6.06. Best, PM -- http://mail.python.org/mailman/listinfo/python-list
Re: Is there an easy way to sort a list by two criteria?
Hello! Thank you all, so much! Now I can do double-criteria sort in at least three ways. More than I have expected. Best, PM -- http://mail.python.org/mailman/listinfo/python-list
Does Pygoogle allows for advanced search options?
Hello All,
Can anyone help me with the Pygoogle:
from pygoogle import pygoogle
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?
Thanks!
PM
--
http://mail.python.org/mailman/listinfo/python-list
Re: Does Pygoogle allows for advanced search options?
> 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" > onhttp://code.google.com/apis/websearch/docs/reference.html, and > lines 68 & 102 of pygoogle.py. >From those lines, it can be concluded that lr=lang_?? is not supported, unfortunately. And, when I execute, I get an error. Is there any other way to get Google search from Python? I really need only number of hits. Best, PM -- http://mail.python.org/mailman/listinfo/python-list
