1

I am using the xgoogle library, whenever i ask it to get the number of search results it comes up with zero. (its not my code i copied it directly from the examples) any ideas?

Joachim Sauer
  • 302,674
  • 57
  • 556
  • 614
Matthew Downey
  • 259
  • 1
  • 6
  • 10

1 Answers1

1

This shows 1000000 results on my Debian system:


jcomeau@intrepid:/usr/src/xgoogle$ cat xg.py 
#!/usr/bin/python
from xgoogle.search import GoogleSearch, SearchError
try:
  gs = GoogleSearch("quick and dirty")
  gs.results_per_page = 50
  results = gs.get_results()
  print 'results', gs.num_results  # number of results
  for res in results:
    print res.title.encode("utf8")
    print res.desc.encode("utf8")
    print res.url.encode("utf8")
    print
except SearchError, e:
  print "Search failed: %s" % e
jcomeau_ictx
  • 37,688
  • 6
  • 92
  • 107