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?
Asked
Active
Viewed 4,138 times
1
-
he has actually accepted some answers, I don't know why it's showing 0%. – jcomeau_ictx Mar 08 '11 at 03:46
1 Answers
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