def get(self): query = console.strfix(self.request.get("query")) page = console.strfix(self.request.get("page")) global FEEDBACK_THANKS if page: page=page else: page=0 start = ((page)) feedback = self.request.get("feedback") global FEEDBACK_THANKS if feedback=="1": FEEDBACK_THANKS="<div align='center'><font color='red'>Thanks for your feedback!</font></div>" else: FEEDBACK_THANKS="" self.response.out.write(FEEDBACK_THANKS ) # qt = query.split() # if len(qt) == 0: # page = do_www(NO_QUERY) # elif qt[0].lower() == "when": # page = do_when(query) # else: page = do_www(query,start) self.response.out.write(page)
def get(self): query = console.strfix(self.request.get("query")) count = int(console.strfix(self.request.get("count"))) offset = int(console.strfix(self.request.get("offset"))) data = ysearch.search(query,vertical="news",count=count,start=offset); images = db.create(data=data) serialized = simplejson.dumps(images.rows) self.response.out.write(serialized)
def get(self): query = console.strfix(self.request.get("query")) count = int(console.strfix(self.request.get("count"))) offset = int(console.strfix(self.request.get("offset"))) includeDelicious = console.strfix(self.request.get("includeDelicious")) search_results = ysearch.search(query,count=count,start=offset); web = db.create(data=search_results) if len(includeDelicious) == 4: dl = db.select(udfs.unnest_value, name="dl", url=u"http://feeds.delicious.com/rss/popular/%s" % query) web = db.join(overlap_predicate,[web,dl]) serialized = simplejson.dumps(web.rows) self.response.out.write(serialized)