You're viewing a comment by Peteris Krumins and its responses.

October 07, 2009, 18:51

Stray, here is the code that I just tried:

>>> from xgoogle.search import GoogleSearch
>>> import time
>>>
>>> gs = GoogleSearch("inurl:polito")
>>> gs.results_per_page = 100
>>> res = []
>>> while True:
...  tmp = gs.get_results()
...  if not tmp:
...   break
...  res.extend(tmp)               
...  time.sleep(5)
...
>>> print len(res)
618

Seems to work for me.

The thing is that Google can show that it has 10 billion results but in reality it will return only 1000 for any search. And if it thinks there are some duplicates in those 1000, then it will return even less. In this case it returned 618 results.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the word "antispam_139": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.