You're viewing a comment by Monika and its responses.

Monika Permalink
August 13, 2014, 08:05

I download the xgoogle library zip folder and now i m trying to use this code for accessing google but this will give invalid syntax error

from import GoogleSearch, SearchError
gs = GoogleSearch("quick and dirty")
gs.results_per_page = 50
results = gs.get_results()
for res in results:
print res.title.encode("utf8")
print res.desc.encode("utf8")
print res.url.encode("utf8")
except SearchError, e:
print "Search failed: %s" % e

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

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

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