hi
my question is simple:
is there another version of google api, sadly this one
http://code.google.com/p/google-api-python-client/ uses httlib2 which
i guess is blocking, so i think the solution is to use
tornado.httpserver and rewrite the library to make it non-blocking?
here is sample code for those that dont know it yet:how to get product
prices using google shop api:
class GCompare(tornado.web.RequestHandler):
def get(self):
begin = time.time()
client = build('shopping', 'v1', developerKey='get a key from
google api')
ressource = client.products()
request = ressource.list(source='public', country='FR',
q=u'iphone 3gs')
t = request.execute()
for i in range(len(t["items"])):
print t["items"][i]["product"]["inventories"][0]["price"]
# return prices
print t["items"][0]["product"]["link"] # return links
print time.time() - begin
this is blocking, and will take a lot of time, even if it returns only
few results (compared to amazon api which returns 10 pages).